In what version(s) of Spring for Apache Kafka are you seeing this issue?
For example:
Between 2.9 and 3.1.1
Describe the bug
DefaultErrorHandler#handleBatchAndReturnRemaining recovered invalid cause infinite loop when kafka listener threw BatchListenerFailedException and error record is first one of partition
@KafkaListener(id = CONTAINER_ID_2, topics = "foo")
public void foo2(List<String> in) {
int index = 0;
for (String str : in) {
if ("qux".equals(str)) { // Deliver 6 records from three partitions, qux is second partition first record
throw new BatchListenerFailedException("test", index);
}
index++;
}
}
Sample
https://github.com/Wzy19930507/spring-boot-issue/tree/issue_231222