-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Milestone
Description
**Affects Version(s):**2.6.3
When using a RetryingBatchErrorHandler, I saw the exception mentioned in the subject being called. I set it up as follows:
FixedBackOff fixedBackOff = new FixedBackOff(500, 2);
RetryingBatchErrorHandler errorHandler =
new RetryingBatchErrorHandler(
fixedBackOff,
new DeadLetterPublishingRecoverer(
kafkaTemplate,
(cr, e) -> new TopicPartition(cr.topic() + "-errors", cr.partition())));
factory.setBatchErrorHandler(errorHandler);
factory.getContainerProperties().setAckMode(ContainerProperties.AckMode.MANUAL);
factory.setBatchListener(true);
The stack trace goes to
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:1095)
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.handleConsumerException(KafkaMessageListenerContainer.java:1398)
at org.springframework.kafka.listener.ListenerInvokingBatchErrorHandler.handle(ListenerInvokingBatchErrorHandler.java:36)
It appears that this error still exists in 2.7.3: https://sourcegraph.com/github.com/spring-projects/[email protected]/-/blob/spring-kafka/src/main/java/org/springframework/kafka/listener/KafkaMessageListenerContainer.java?L1603:1