Skip to content

Commit

Permalink
Justerte max poll records og poll timeout for key maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsmsa committed Nov 14, 2024
1 parent a098d6b commit a92d7c9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ fun KafkaFactory.initPeriodeConsumer(
keyDeserializer = LongDeserializer::class,
valueDeserializer = PeriodeDeserializer::class,
autoCommit = false,
autoOffsetReset = "earliest"
autoOffsetReset = "earliest",
maxPollrecords = 1000
)
val reblancingListener = HwmRebalanceListener(applicationContext, periodeConsumer)
periodeConsumer.subscribe(listOf(periodeTopic))
return reblancingListener to periodeConsumer.asSequence(
stop = applicationContext.shutdownCalled,
pollTimeout = Duration.ofMillis(500),
pollTimeout = Duration.ofMillis(1000),
closeTimeout = Duration.ofSeconds(1)
)
}
Expand Down

0 comments on commit a92d7c9

Please sign in to comment.