Repository navigation
Reject duplicate client-provided consumer tags in basic.consume - #2137
Merged
Merged
Conversation
Calling basic.consume with a consumer tag already in use on the
channel makes the broker close the channel. This can happen during
connection recovery, when the application consumes with the same tag
as a recorded consumer being recovered.
ChannelN now rejects a client-provided consumer tag that is already
registered or reserved by an in-flight basic.consume, throwing an
IllegalStateException before anything is sent to the broker. Tags are
reserved ("leased") atomically before the request is sent and released
when the call completes, so concurrent calls with the same tag cannot
both reach the broker. A plain check is not enough because the RPC
slot is released before the consume-ok reply registers the consumer.
Consumer recovery skips a recorded consumer whose tag is already
registered on the new channel by the application.
Contributor
Author
|
@Mergifyio backport to v5.x |
❌ No backport have been createdDetails
GitHub error:
|
acogoluegnes
added a commit
that referenced
this pull request
Oct 23, 2026
Reject duplicate client-provided consumer tags in basic.consume (backport #2137)
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.
Calling basic.consume with a consumer tag already in use on the channel makes the broker close the channel. This can happen during connection recovery, when the application consumes with the same tag as a recorded consumer being recovered.
ChannelN now rejects a client-provided consumer tag that is already registered or reserved by an in-flight basic.consume, throwing an IllegalStateException before anything is sent to the broker. Tags are reserved ("leased") atomically before the request is sent and released when the call completes, so concurrent calls with the same tag cannot both reach the broker. A plain check is not enough because the RPC slot is released before the consume-ok reply registers the consumer.
Consumer recovery skips a recorded consumer whose tag is already registered on the new channel by the application.