Closed
Description
version 3.1.2 - 3.2.2
When using blocking retries an back-off (e.g new FixedBackOff(5000, 2)
), there is an error message in the log:
...KafkaMessageListenerContainer : Error handler threw an exception
org.springframework.kafka.KafkaException: Seek to current after exception
...
I see two confusing things here:
- the log states that it is an exception of Error Handler, and occurred while seeking. Even though it has a real exception in
Caused by
, the beginning is wrong in my opinion because the Error Handler didn't fail handling my errors - the log is printed after the back-off interval (5s in my example), right before the next attempt
To reproduce:
- Create DefaultErrorHandler as a Spring bean
- Set a back-off with a notable interval
- Set this error handler in KafkaListenerContainerFactory used for the listener
Expected behavior
Either no error message at all, or log it right after the attempt fails, before the back-off pause, and with less confusing message
Sample
https://github.com/lm231290/kafka-tests
There is a retry.log
file there with my execution example
Or you can run ListenerTest.test_single and see the log messages and the timestamps