In what version(s) of Spring for Apache Kafka are you seeing this issue?
Between 3.2.x and 4.0.x
Describe the bug
In KafkaMessageListenerContainer there is a bug for ackMode=COUNT_TIME.
|
if (this.isCountAck) { |
|
countAcks(); |
|
} |
|
else if (this.isTimeAck) { |
|
timedAcks(); |
For
ackMode=COUNT_TIME, both
isCountAck and
isTimeAck are true. However, only
countAcks() will be executed because of the if-else if structure –
timedAcks() is never called.
To Reproduce
Check logic in KafkaMessageListenerContainer.processCommits().
Expected behavior
KafkaMessageListenerContainer should consider both ackTime and ackCount for ackMode=COUNT_TIME.
In what version(s) of Spring for Apache Kafka are you seeing this issue?
Between 3.2.x and 4.0.x
Describe the bug
In
KafkaMessageListenerContainerthere is a bug forackMode=COUNT_TIME.spring-kafka/spring-kafka/src/main/java/org/springframework/kafka/listener/KafkaMessageListenerContainer.java
Lines 3249 to 3253 in 5be5015
For
ackMode=COUNT_TIME, bothisCountAckandisTimeAckare true. However, onlycountAcks()will be executed because of the if-else if structure –timedAcks()is never called.To Reproduce
Check logic in
KafkaMessageListenerContainer.processCommits().Expected behavior
KafkaMessageListenerContainershould consider bothackTimeandackCountforackMode=COUNT_TIME.