Skip to content

Spring-kafka 2.7.4 - producing lots of logs when deserialization failed #1911

Answered by garyrussell
vivekkamineni asked this question in Q&A
Discussion options

You must be logged in to vote

By default, if you have a @DltHandler, it will retry failures forever.

We need to look at making that conditional on the exception type; clearly a deserialization exception will never succeed.

In the meantime, you can set the strategy to FAIL_ON_ERROR.

See https://docs.spring.io/spring-kafka/docs/current/reference/html/#dlt-failure-behavior

Or, instead of configuring a @DltHandler, configure your own listener to consume from the DLT - by the default, the SeekToCurrentErrorHandler will not retry DeserializationException.

cc/ @tomazfernandes

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@vivekkamineni
Comment options

Answer selected by garyrussell
Comment options

You must be logged in to vote
1 reply
@garyrussell
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants