How to specify a virtual host?
nikoheikkila opened this issue · 2 comments
nikoheikkila commented
Hi, thanks for developing this tool.
I have a project where I'm working with multiple RabbitMQ virtual hosts and I would like to tap to a specified exchange in a virtual host other than the default '/'
. Does this tool support it?
Currently trying to tap gives following errors:
ERRO[0000] Exception (404) Reason: "NOT_FOUND - no exchange 'messages' in vhost '/'"
Which is because the exchange messages
is located in vhost /interface
.
jandelgado commented
Hi, just add the vhost to the AMQP-URI, e.g.
$ ./rabtap-linux-amd64 --uri amqp://guest:guest@localhost:5672/vh1 tap amq.fanout:
This will tap to exchange amq.fanout
in virtual host vh1
.
See also https://www.rabbitmq.com/uri-spec.html
regards
Jan
nikoheikkila commented
Cool, didn't know about the URI scheme. This fixed it. 👍