Adding RabbitMQ Administrator CLI (rabbitmqadmin) to Container
How to enable it?
Run the following script:
This will install the CLI in all Pods.
If you only have one Pod (single node deployment), you will probably see the following error:
You can ignore it.
(Optional) Enable bash auto-completion for the CLI
After you've successfully installed rabbitmqadmin, you can enable the tab-enabled auto-completion by running:
source $(./rabbitmqadmin --bash-completion)
./rabbitmqadmin [PRESS TAB + TAB]:
--depth
--host
--sort
--vhost
delete
help
publish
--format
--password
--sort-reverse
close
export
import
purge
--help
--port
--username
declare
get
list
showHow to print the number of messages and consumers per queue?
./rabbitmqadmin list queues name consumers messages
+------------------------------------------------------------------------------------------+-----------+----------+
| name | consumers | messages |
+------------------------------------------------------------------------------------------+-----------+----------+
| activities/addDirectActivity_v1 | 1 | 0 |
| alerts/updateAlertsForDeletedGroups_v1 | 1 | 0 |
| alerts/updateAlertsForDeletedUsers_v1 | 1 | 0 |
...More info about the commands can be foundĀ here.
0 comments