Skip to content

GH-4444: Consider ackTime for COUNT_TIME commits#4449

Merged
sobychacko merged 1 commit into
spring-projects:mainfrom
nikita-kibitkin:GH-4444
May 28, 2026
Merged

GH-4444: Consider ackTime for COUNT_TIME commits#4449
sobychacko merged 1 commit into
spring-projects:mainfrom
nikita-kibitkin:GH-4444

Conversation

@nikita-kibitkin

Copy link
Copy Markdown
Contributor

Fixes #4444

AckMode.COUNT_TIME sets both isCountAck and isTimeAck, but ListenerConsumer.processCommits() used an if / else if chain. As a result, countAcks() always won and timedAcks() was never evaluated for COUNT_TIME.

This updates the commit processing so count-based and time-based checks are both evaluated for COUNT_TIME, while keeping the regular fallback commit path limited to modes that are neither count-based nor time-based.

A regression test verifies that COUNT_TIME commits when ackTime elapses even if ackCount has not been reached.

Signed-off-by: Nikita Kibitkin <nikita.n.kibitkin@gmail.com>
@sobychacko sobychacko merged commit 1de4584 into spring-projects:main May 28, 2026
3 checks passed
spring-builds pushed a commit that referenced this pull request May 28, 2026
Fixes #4444

Signed-off-by: Nikita Kibitkin <nikita.n.kibitkin@gmail.com>
(cherry picked from commit 1de4584)
spring-builds pushed a commit that referenced this pull request May 28, 2026
Fixes #4444

Signed-off-by: Nikita Kibitkin <nikita.n.kibitkin@gmail.com>
(cherry picked from commit 1de4584)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KafkaMessageListenerContainer for ackMode=COUNT_TIME doesn't check ackTime

2 participants