Add publisher confirms tutorial using ConfirmationPublisher - #707
Open
lukebakken wants to merge 2 commits into
Open
Add publisher confirms tutorial using ConfirmationPublisher#707lukebakken wants to merge 2 commits into
lukebakken wants to merge 2 commits into
Conversation
lukebakken
force-pushed
the
lukebakken/publisher-confirm-tracking
branch
from
December 18, 2025 20:01
0628cc5 to
908d1d5
Compare
Contributor
|
Whoops, this has slipped through the cracks in December. |
Collaborator
Author
|
No worries, these changes depend on unmerged PR rabbitmq/rabbitmq-java-client#1824 |
The new `ConfirmationChannel` API introduced in rabbitmq/rabbitmq-java-client#1824 provides asynchronous publisher confirmation tracking with a `CompletableFuture`-based API, rate limiting, and message correlation support. This change adds `PublisherConfirmsAsync.java` to demonstrate the `ConfirmationChannel` API. The tutorial shows how to create a `ConfirmationChannel` wrapper with rate limiting, publish messages asynchronously with correlation context, and wait for all confirmations using `CompletableFuture.allOf()`. Depends on rabbitmq/rabbitmq-java-client#1824
lukebakken
force-pushed
the
lukebakken/publisher-confirm-tracking
branch
from
July 12, 2026 20:27
908d1d5 to
807628e
Compare
The java client reworked the async confirmation API from ConfirmationChannel, which wrapped a Channel and took a RateLimiter, to a standalone ConfirmationPublisher created from a Connection with an optional bound on outstanding confirmations. Update the tutorial to match: the publisher owns its own channel, the application declares its queue on a separate channel, and backpressure is expressed as a maximum number of unconfirmed messages.
ConfirmationChannel
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.
The new
ConfirmationPublisherAPI introduced in rabbitmq/rabbitmq-java-client#1824 provides asynchronous publisher confirmation tracking with aCompletableFuture-based API, optional bounded-outstanding backpressure, and message correlation support.This change adds
PublisherConfirmsAsync.javato demonstrate theConfirmationPublisherAPI. The tutorial shows how to create aConfirmationPublisherfrom aConnectionwith a bound on outstanding confirmations, publish messages asynchronously with a correlation context, handle nacks and returns throughPublishException, and wait for all confirmations usingCompletableFuture.allOf().Depends on rabbitmq/rabbitmq-java-client#1824