RabbitMQ - List Exchanges using the rabbitmqctl command

The rabbitmqctl command with the list_exchanges option can be used to list every exchange in a virtual host. If you do not specify a virtual host, the default / (forward slash) virtual host will be used.

~]# rabbitmqctl list_exchanges
Listing exchanges for vhost / ...
name        type
exchange001 direct
exchange002 topic


Or, the -p or --vhost option can be used to specify the virtual host.

~]# rabbitmqctl list_exchanges --vhost foo
Listing exchanges for vhost foo ,,,
name        type
a.exchange  direct
b.exchange  headers


The --formatter json option can be used to return the output in JSON.

rabbitmqctl list_exchanges --formatter json

Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee

Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter bf341 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |