-
Notifications
You must be signed in to change notification settings - Fork 4k
AMQP 1.0: Support dynamic creation of queues #13231
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
Make AMQP 1.0 connection shut down its sessions before sending the close frame to the client similar to how the AMQP 0.9.1 connection shuts down its channels before closing the connection. This commit avoids concurrent deletion of exclusive queues by the session process and the classic queue process. This commit should also fix #2596
## What? Support the `dynamic` field of sources and targets. ## Why? 1. This allows AMQP clients to dynamically create exclusive queues, which can be useful for RPC workloads. 2. Support creation of JMS temporary queues over AMQP using the Qpid JMS client. Exclusive queues map very nicely to JMS temporary queues because: > Although sessions are used to create temporary destinations, this is only for convenience. Their scope is actually the entire connection. Their lifetime is that of their connection and any of the connection’s sessions are allowed to create a consumer for them. https://jakarta.ee/specifications/messaging/3.1/jakarta-messaging-spec-3.1#creating-temporary-destinations ## How? If the terminus contains the capability `temporary-queue` as defined in [amqp-bindmap-jms-v1.0-wd10](https://groups.oasis-open.org/higherlogic/ws/public/document?document_id=67638) [5.2] and as sent by Qpid JMS client, RabbitMQ will create an exclusive queue. (This allows a future commit to take other actions if capability `temporary-topic` will be used, such as the additional creation of bindings.) No matter what the desired node properties are, RabbitMQ will set the lifetime policy delete-on-close deleting the exclusive queue when the link which caused its creation ceases to exist. This means the exclusive queue will be deleted if either: * the link gets detached, or * the session ends, or * the connection closes Although the AMQP JMS Mapping and Qpid JMS create only a **sending** link with `dynamic=true`, this commit also supports **receiving** links with `dynamic=true` for non-JMS AMQP clients. RabbitMQ is free to choose the generated queue name. As suggested by the AMQP spec, the generated queue name will contain the container-id and link name unless they are very long. Co-authored-by: Arnaud Cogoluègnes <acogoluegnes@gmail.com>
acogoluegnes
approved these changes
Feb 12, 2025
ansd
added a commit
to rabbitmq/rabbitmq-website
that referenced
this pull request
Feb 12, 2025
`dynamic` is implemented by rabbitmq/rabbitmq-server#13231
ansd
added a commit
to rabbitmq/rabbitmq-website
that referenced
this pull request
Feb 12, 2025
`dynamic` is implemented by rabbitmq/rabbitmq-server#13231
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?
dynamic
field of sources and targets.Why?
can be useful for RPC workloads.
client. Exclusive queues map very nicely to JMS temporary queues
because:
https://jakarta.ee/specifications/messaging/3.1/jakarta-messaging-spec-3.1#creating-temporary-destinations
How?
If the terminus contains the capability
temporary-queue
as defined inamqp-bindmap-jms-v1.0-wd10
[5.2] and as sent by Qpid JMS client,
RabbitMQ will create an exclusive queue.
(This allows a future commit to take other actions if capability
temporary-topic
will be used, such as the additional creation of bindings.)No matter what the desired node properties are, RabbitMQ will set the
lifetime policy delete-on-close deleting the exclusive queue when the
link which caused its creation ceases to exist. This means the exclusive
queue will be deleted if either:
Although the AMQP JMS Mapping and Qpid JMS create only a sending link
with
dynamic=true
, this commit also supports receiving links withdynamic=true
for non-JMS AMQP clients.RabbitMQ is free to choose the generated queue name. As suggested by the
AMQP spec, the generated queue name will contain the container-id and link
name unless they are very long.