-
Notifications
You must be signed in to change notification settings - Fork 4k
Detach link for link-level errors #14389
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
Merged
Merged
Conversation
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
7992976 to
ce969f6
Compare
acogoluegnes
added a commit
to rabbitmq/rabbitmq-amqp-java-client
that referenced
this pull request
Aug 18, 2025
acogoluegnes
added a commit
to rabbitmq/rabbitmq-amqp-java-client
that referenced
this pull request
Aug 18, 2025
294b30a to
c69c33e
Compare
## What? Refuse or detach the link instead of ending the session for many link-level errors, including the following: * Source queue or target exchange doesn't exist during attach * Trying to consume from an exclusive queue on a different connection * Delivery of message to a target queue fails * Wrong delivery-id * Wrong settled flag * Queue declaration fails for dynamic queues * Publishing to internal exchange ## Why? Because many errors are scoped to a single terminus, detaching just that link preserves the rest of the session’s links - avoiding needless disruption of other traffic. AMQP 1.0’s error model is hierarchical; RabbitMQ should escalate to ending the session only for session-level faults or if the client keeps using a destroyed link. ## How? Refuse link as per figure 2.33
acogoluegnes
added a commit
to rabbitmq/rabbitmq-amqp-java-client
that referenced
this pull request
Sep 2, 2025
michaelklishin
pushed a commit
that referenced
this pull request
Nov 24, 2025
Follow-up to #14389 Without these changes, the attach frame doesn't set any settlement mode. This leads to settlement negotiation errors hiding the actual error. For example, omq amqp -y 0 -t /queues/no-such-queue omq amqp -x 0 -T /queues/no-such-queue Returned `amqp: sender settlement mode "unsettled" requested, received "mixed" from server"`, when the actual error in the next (detach) frame was `amqp:not-found`. However, the attach frame triggers a client-side error before the detach frame is processed.
mergify bot
pushed a commit
that referenced
this pull request
Nov 24, 2025
Follow-up to #14389 Without these changes, the attach frame doesn't set any settlement mode. This leads to settlement negotiation errors hiding the actual error. For example, omq amqp -y 0 -t /queues/no-such-queue omq amqp -x 0 -T /queues/no-such-queue Returned `amqp: sender settlement mode "unsettled" requested, received "mixed" from server"`, when the actual error in the next (detach) frame was `amqp:not-found`. However, the attach frame triggers a client-side error before the detach frame is processed. (cherry picked from commit f261afc)
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.
What?
Refuse or detach the link instead of ending the session for many
link-level errors, including the following:
Why?
Because many errors are scoped to a single terminus, detaching just that link
preserves the rest of the session’s links - avoiding needless disruption of
other traffic. AMQP 1.0’s error model is hierarchical; RabbitMQ should escalate to
ending the session only for session-level faults or if the client keeps
using a destroyed link.
How?
Refuse link as per figure 2.33