-
Notifications
You must be signed in to change notification settings - Fork 3.9k
AMQP 1.0 client: make it easier to pass in a virtual host #13661
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 client: make it easier to pass in a virtual host #13661
Conversation
while AMQP 1.0 does not have the concept of virtual hosts, RabbitMQ still does, and so do shovels and other components. Currently the way to pass a virtual host is via a query parameter named 'hostname', which is very counterintuitive to most users. With this PR, there are now two better options: 1. The URI path, with the leading slash stripped off 2. The 'vhost' query parameter which is formatted correctly Both still feed the 'hostname' connection parameter but are much easier to guess and remember for, say, AMQP 1.0 Shovel users.
I don't feel strongly about the URI path segment part, it can be rolled back. But asking the user to pass in a |
* Add test case specifying vhost three different ways in the URI to see which one "wins".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a good change. The client is a generic AMQP client not a RabbitMQ specific wrapper. There is no vhost
parameter in the AMQP open frame.
@kjnilsson we do not have a different client to use for AMQP 1.0 shovels. With this change, nothing breaks for those who use this client with another AMQP 1.0 broker. Our current "solution" for specifying a virtual host is incredibly confusing. At the very least we should support |
The conclusion is: there are plans to change way we propagate this additional piece of information from the AMQP 1.0 Erlang client to the AMQP 1.0 implementation in RabbitMQ (the change won't affect other AMQP 1.0 brokers). We'd still need a simplification of URI parsing, possibly in the Shovel plugin, but the I'll update Shovel guides a bit to make extra clear what needs to be done at the moment, a |
I agree. Any RabbitMQ specific things should ideally go into the RabbitMQ specific wrapper: https://github.com/rabbitmq/rabbitmq-server/tree/main/deps/rabbitmq_amqp_client |
while AMQP 1.0 does not have the concept of virtual hosts, RabbitMQ still does, and so do shovels
and other components.
Currently the way to pass a virtual host is via
a query parameter named 'hostname', which is
very counterintuitive to most users.
With this PR, there are now two better options:
Both still feed the 'hostname' connection parameter but are much easier to guess and remember
for, say, AMQP 1.0 Shovel users.