Skip to content

KafkaMessageListenerContainer for ackMode=COUNT_TIME doesn't check ackTime #4444

@olga-larina

Description

@olga-larina

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions