GH-4380: Add AcknowledgementCommitCallback support for async share co…#4390
Merged
Conversation
11e62f7 to
6b48049
Compare
artembilan
requested changes
Apr 7, 2026
artembilan
left a comment
Member
There was a problem hiding this comment.
Change order of import in ShareKafkaMessageListenerContainer…
please, consider to run ./gradlew check and fix all the failures locally before pushing to the remote branch.
All of those Checkstyle violations feels like your PR is not ready for review.
artembilan
requested changes
Apr 8, 2026
artembilan
left a comment
Member
There was a problem hiding this comment.
Thanks for the update!
Let's see if my review makes sense!
… async share consumer commits Wire AcknowledgementCommitCallback into the share consumer container to provide visibility into async commit success or failure. When syncShareCommits=false, a default callback is registered that logs commit failures. Users can also provide a custom callback via ContainerProperties.setAcknowledgementCommitCallback() for custom error handling or coordination with external systems. Changes: - ContainerProperties: added acknowledgementCommitCallback field, setter and getter - ShareKafkaMessageListenerContainer: register the callback on the ShareConsumer before subscribe, with a default logging callback for async mode Fixes spring-projectsgh-4380 Signed-off-by: Maxwell Balla <ballamaxwell7@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4380
Following up on #4379 (async commit option), this PR adds
AcknowledgementCommitCallback support to the share consumer container.
When
syncShareCommits=false, a default callback is registered that logscommit failures. Users can provide a custom callback via
ContainerProperties.setAcknowledgementCommitCallback()for custom errorhandling.
Changes:
ContainerProperties: addedacknowledgementCommitCallbackfield with setter/getterShareKafkaMessageListenerContainer: register the callback on theShareConsumerbefore
subscribe(), with a default logging callback for async mode