Bootstrap FreeKB - RabbitMQ - List Exchanges using the rabbitmqctl command
RabbitMQ - List Exchanges using the rabbitmqctl command

Updated:   |  RabbitMQ articles

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



Comments


Add a Comment


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