Skip to content

Does an asynchronous return type in a @KafkaListener requires using manual ACKs? #3290

Answered by sobychacko
helpermethod asked this question in Q&A
Discussion options

You must be logged in to vote

The framework automatically sets the ack mode to MANUAL when enabling async replies. This means that the normal ack mechanisms in a regular listener are not applied here; rather, the framework manually acknowledges the record once the async processing is complete. It might look a bit confusing since MANUAL means the users are acknowledging it manually in the application and not the framework, but in the case of async replies, MANUAL means that the framework waits for the completion callback to return and then manually ack it. Therefore, you do not need to do any manual acknowledgment when the listener is suspended.

Here is the PR that made this change: https://github.com/spring-projects/s…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@helpermethod
Comment options

Answer selected by helpermethod
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants