DeserializationException recovery with non-blocking retries #2460
-
When using non-blocking retries, and listeners that receive a single record, is there some way to use When not using non-blocking retries, it is clear that the configured When using non-blocking retries (and having prepared the Also, as the DLT is the last in the chain, there is no another level of record recoverer. What happens is just a log with the message " I need to have access to, and decide what to do with these records. Some applications of ours here cannot afford to "lose" records. A possibility might be to configure a plain |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
Well, I figured out a way to achieve what I want. To declare an explicit But this listener is not associated with non blocking retries. This way, I can configure in the regular |
Beta Was this translation helpful? Give feedback.
-
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
The last one is probably the simplest. |
Beta Was this translation helpful? Give feedback.
-
Feeling flattered for so many attention. :) It is good to see you approach, because I would not know how to customize a specific container with CustomizersConfigurer. This trick of inspecting the topic name of the container may be very usefull. I think I will go with your solution. PS.: as you can see in the last days, I've been studying the non-blocking retries features a lot. Maybe I can share some other questions, ideas and small bugs I have here. |
Beta Was this translation helpful? Give feedback.
-
Please open a bug issue for that; it certainly doesn't look right. |
Beta Was this translation helpful? Give feedback.
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
KafkaConsumer
from theDefaultKafkaConsumerFactory
and use it directly with aByteArrayDeserializer
to consume from the DLT topic (instead of using a listener container).value()
to a header and set the value tonull
(and…