-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
AMQP 1.0: Consider adding (non-normative) connection properties topic-prefix
and queue-prefix
#12531
Comments
topic-prefix
and queue-prefix
topic-prefix
and queue-prefix
`queue-prefix` and `topic-prefix` properties of the `open` frame are not part of the AMQP spec. However, let's include these properties because they are also returned by ActiveMQ and Solace and understood by some client libs (e.g. ActiveMQ NMS.AMQP Client). Closes #12531
Thank you @alaendle , this is a great suggestion.
Which other clients handle these properties? |
Thanks @ansd 😊. I was actually imprecise regarding the client software. At this point we have to differentiate between pure AMQP encapsulating libraries and libraries that have an idea of topics/queues. Another example in the category of topic/queue aware libraries is Apache QPID JMS (https://github.com/apache/qpid-jms/blob/2d799c153a6b51f07a4c9ccec4a8751598183733/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConnectionProperties.java#L112). But therefore maybe the more interesting question is how common the two connection properties are among other AMQP 1.0 brokers, because even if a "low-level" library is used the information about the prefixes is needed - it just needs to be handled in the client code (at least if interoperating with a broker that internally uses the topic/queue concept). Would it help my feature request if I trace and add the OPEN telegrams of other AMQP brokers? Or are you already convinced 😉 |
Thank you @alaendle. I was already convinced. I was just wondering out of interest which other client libs parse these prefixes. Thanks for the link to the QPid JMS client 🙂 |
`queue-prefix` and `topic-prefix` properties of the `open` frame are not part of the AMQP spec. However, let's include these properties because they are also returned by ActiveMQ and Solace and understood by some client libs (e.g. ActiveMQ NMS.AMQP Client). Closes #12531
The `queue-prefix` property of the `open` frame is not part of the AMQP spec. However, let's include this property because it is also returned by ActiveMQ and Solace and understood by some client libs, e.g. ActiveMQ NMS.AMQP and Qpid JMS. Note that we do not set `topic-prefix` here because `/exchanges/amq.topic/` is a valid target address prefix but not a valid source address prefix. Closes #12531
The `queue-prefix` property of the `open` frame is not part of the AMQP spec. However, let's include this property because it is also returned by ActiveMQ and Solace and understood by some client libs, e.g. ActiveMQ NMS.AMQP and Qpid JMS. Note that we do not set `topic-prefix` here because `/exchanges/amq.topic/` is a valid target address prefix but not a valid source address prefix. Closes #12531
After evaluating this feature, we've decided in #12541 (comment) to not add these properties at this time since they introduce more problems than they solve. |
Thanks @ansd for all the effort you took to analyse this in such detail; and I really have to admit that from a pure RabbitMQ perspective it is not possible to provide a solution that covers all possible usage scenarios - so leaving this problem open is maybe the best thing to do. However one last question, if I want to abstract the concrete AMQP broker from my client code - is the workaround to add these properties via environment or advanced configuration okay - or do you also see this as problematic?
(maybe even adapted to v2-address scheme after my application become ready) |
I think your workaround might be suitable for the v1 address formats. For the v2 address formats, the client app or an admin must make sure that the topology (queue and/or binding) gets created prior to attaching a link. (More infos on the motivation of the v2 address format can be found in #10873 (comment)) |
Is your feature request related to a problem? Please describe.
Client code should be independent from broker internals - therefore the prefixes should be encapsulated by the protocol. Unfortunately there is no standardisation of the connection properties (http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#type-open).
But most clients respect the mentioned prefixes (e.g. Apache.NMS.AMQP (https://github.com/apache/activemq-nms-amqp/blob/5e4e137b071101463b8083f8a8a1cddada5b6f8a/src/NMS.AMQP/Provider/Amqp/AmqpConnection.cs#L161)) and many brokers provide this information (e.g. Solace (https://docs.solace.com/API/AMQP/AMQP-Protocol-Conformance.htm#section-2-7-1-open) & ActiveMQ (https://github.com/apache/activemq/blob/4ff78ddab993d62408c8e63ce63a63d5757fe039/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpConnection.java#L209))
Describe the solution you'd like
I think it would be a good idea to include the prefix information into the transmitted connection properties:
Just to make it clear - here a response from an RabbitMQ connection:
And here Solace:
So basically I request to add
topic-prefix
andqueue-prefix
.Describe alternatives you've considered
At least there seems to be an easy workaround - as the server properties are extensible via an environment variable:
Additional context
Please let me know if I was unclear or if I could contribute further information!
The text was updated successfully, but these errors were encountered: