Last active
March 4, 2022 12:38
-
-
Save Daniel-Jacob/7cec1b3f2dc379df948ffcb03f0c3118 to your computer and use it in GitHub Desktop.
kafka config for exponential backoff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Bean | |
fun errorHandler(kafkaProperties: KafkaProperties): DefaultErrorHandler = | |
run { | |
val backOff = ExponentialBackOff(3000, 2.0) | |
backOff.maxElapsedTime = 60000 | |
DefaultErrorHandler(DeadLetterPublishingRecoverer(errorKafkaTemplate(kafkaProperties)), backOff) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment