[๐ BUG]: Incorrect name of the default AMQP exchange (should be 'amq.default')
janchaloupka opened this issue ยท 5 comments
No duplicates ๐ฅฒ.
- I have searched for a similar issue in our bug tracker and didn't find any solutions.
What happened?
When the exchange name for the AMQP pipeline is not specified, the roadrunner defaults to exchange with the name amqp.default
. This is incorrect as the default exchange name is amq.default
- as evident from the RabbitMq web interface and official RabbitMq documentation:
For convenience RabbitMQ maps AMQP 0-9-1's default exchange's blank name to 'amq.default' when performing permission checks
Source: https://www.rabbitmq.com/docs/access-control
Version (rr --version)
2023.3.11
How to reproduce the issue?
Define amqp job pipeline without the exchange
key, for example:
jobs:
consume:
- test
pipelines:
test:
driver: amqp
config:
durable: true
queue: testQueue
Roadrunner then on startup creates a new amqp.default
exchange, when I expected it to use the existing amq.default
exchange.
Relevant log output
No response
Hey @janchaloupka ๐
amq.default
is a server reserved name. These names are declared on a RabbitMQ (server) side when passing an empty string for the exchange name.
As for the RR, RR's default exchange name is amqp.default
, because it can be declared as a non-reserved (amq.*
names are reserved) name.
@janchaloupka
But still, your proposal makes sense to me. Might be it would be better to use a pre-declared default exchange. Could you please send a PR with that fix? Will see if the tests are good after that.
@janchaloupka ๐
I double-checked everything, this would be problematic to use a amq.default
exchange (as the default in the options), since it would require to change a lot inside the plugin. Since the operations like checking for the exchange options on the default exchange are not permitted as well as listening, resuming, pausing, etc. The only permitted operation is pushing, but you can push to any exchange by specifying the exchange name in the push options.
Hence, I have to close your bug-report.
Hello @rustatian, thank you for your fast response. I'm sorry, I must have missed your previous messages directed to me.
Unfortunately I have reached the same conclusion as you did and I agree that that it is not worth the effort.
But still, if that problem is somehow blocks you from using RR, you may fork this plugin, tune it for your use case and build RR binary with Velox
: https://docs.roadrunner.dev/customization/build ๐