Between 3.3.15 and 4.0.5
Due to changes done by #3762 the DefaultAfterRollbackProcessor stops working for batch-listeners consuming ConsumerRecords (ListenerConsumer.wantsFullRecords=true). ListenerConsumer.batchRollback receives an empty recordList instead null like before the change.
|
List<ConsumerRecord<K, V>> recordList = new ArrayList<>(); |
This causes the call to
SeekUtils.doSeeksToBegin within
DefaultAfterRollbackProcessor#processBatch to do nothing, since the
recordList is only populated when it's
null.
To Reproduce
Compare listener consuming List<ConsumerRecord> with one consuming ConsumerRecords.
Expected behavior
Consistent behavior for listeners consuming List<ConsumerRecord> or ConsumerRecords
Between 3.3.15 and 4.0.5
Due to changes done by #3762 the
DefaultAfterRollbackProcessorstops working for batch-listeners consumingConsumerRecords(ListenerConsumer.wantsFullRecords=true).ListenerConsumer.batchRollbackreceives an emptyrecordListinstead null like before the change.spring-kafka/spring-kafka/src/main/java/org/springframework/kafka/listener/KafkaMessageListenerContainer.java
Line 2174 in cfd7c98
This causes the call to
SeekUtils.doSeeksToBeginwithinDefaultAfterRollbackProcessor#processBatchto do nothing, since therecordListis only populated when it'snull.To Reproduce
Compare listener consuming
List<ConsumerRecord>with one consumingConsumerRecords.Expected behavior
Consistent behavior for listeners consuming
List<ConsumerRecord>orConsumerRecords