spring-kafka icon indicating copy to clipboard operation
spring-kafka copied to clipboard

KafkaHeaders.DELIVERY_ATTEMPT is not added for batch listeners

Open lm231290 opened this issue 1 year ago • 8 comments
trafficstars

Version 3.3.2

When using blocking retries for a batch listener, the attempt number is not coming in DELIVERY_ATTEMPT header even if setting setDeliveryAttemptHeader(true)

The method KafkaMessageListenerContainer.ListenerConsumer.internalHeaders is called only in ConsumerRecord<K, V> checkEarlyIntercept(ConsumerRecord<K, V> recordArg) which is used for a regular listener, and is not called in ConsumerRecords<K, V> checkEarlyIntercept(ConsumerRecords<K, V> nextArg) which is used for a batch listener

lm231290 avatar Aug 05 '24 23:08 lm231290