Skip to content

DeserializationException recovery with non-blocking retries #2460

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

You must be logged in to vote

Sorry; I had this answer staged and I was working on option 3 but had to run out for a couple of hours.

Your solution is simpler, but I will complete my example and post it here.

Interesting point.

The container knows nothing about non-blocking retries, DLTs, etc, etc.

The records are not actually "lost" they are still sitting in the DLT topic.

I can think of a few solutions

  1. Create a KafkaConsumer from the DefaultKafkaConsumerFactory and use it directly with a ByteArrayDeserializer to consume from the DLT topic (instead of using a listener container).
  2. Add a producer interceptor and, when publishing one of these to the DLT topic, move the value() to a header and set the value to null (and…

Replies: 4 comments 5 replies

Comment options

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

Comment options

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

Answer selected by jgslima
Comment options

You must be logged in to vote
2 replies
@garyrussell
Comment options

@jgslima
Comment options

Comment options

You must be logged in to vote
1 reply
@jgslima
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
2 participants