Skip to content

Commit

Permalink
Abris #256 limit offset reset interval in ConfluentKafkaAvroReader ex…
Browse files Browse the repository at this point in the history
…ample

(cherry picked from commit de286a7)
  • Loading branch information
cerveada committed Dec 21, 2021
1 parent 51993fa commit 0829165
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ package za.co.absa.abris.examples

import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.functions.col
import org.apache.spark.sql.streaming.Trigger
import za.co.absa.abris.avro.read.confluent.SchemaManagerFactory
import za.co.absa.abris.avro.registry.SchemaSubject
import za.co.absa.abris.config.AbrisConfig

import scala.concurrent.duration.DurationInt

object ConfluentKafkaAvroReader {

val kafkaTopicName = "test_topic"
Expand Down Expand Up @@ -63,6 +66,7 @@ object ConfluentKafkaAvroReader {
deserialized
.writeStream
.format("console")
.trigger(Trigger.ProcessingTime(5.seconds))
.option("truncate", "false")
.start()
.awaitTermination()
Expand Down

0 comments on commit 0829165

Please sign in to comment.