Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-3695: Fix MessagingMessageListenerAdapter to not ack when sync #3696

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

artembilan
Copy link
Member

Fixes: #3695

Even if th @KafkaHandler method is void the DelegatingInvocableHandler returns an empty InvocationResult. That triggers a MessagingMessageListenerAdapter.handleResult() logic. On the completableFutureResult.whenComplete() we call acknowledge() which is not expected for void POJO methods.

  • Fix MessagingMessageListenerAdapter to check for isAsyncReplies() before calling acknowledge()

This is a regression after #3528

…ack when sync

Fixes: spring-projects#3695

Even if th `@KafkaHandler` method is `void` the `DelegatingInvocableHandler` returns an empty `InvocationResult`.
That triggers a `MessagingMessageListenerAdapter.handleResult()` logic.
On the `completableFutureResult.whenComplete()` we call `acknowledge()` which is not expected for `void` POJO methods.

* Fix `MessagingMessageListenerAdapter` to check for `isAsyncReplies()` before calling `acknowledge()`

This is a regression after spring-projects#3528
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.

Acknowledge+commit always issued in AckMode.MANUAL
1 participant