Cluster start and stop


Ensure that any services using RabbitMQ are stopped.

Stop the rabbitmq container on all controller nodes (one by one) and note the order of the nodes.

docker stop rabbitmq


Successively start the rabbitmq container on all controller nodes (one by one) in the reverse order.

docker start rabbitmq


docker exec -it rabbitmq rabbitmqctl cluster_status
Cluster status of node 'rabbit@testbed-node-1'

Emptying the notification queues

If notifications of individual services are activated and these notifications are not consumed, for example by Panko, over the course of time many unprocessed messages accumulate on the individual notification queues.

docker exec -it rabbitmq rabbitmqctl list_queues | grep -v $'\t0'
Listing queues
versioned_notifications.info    2983
versioned_notifications.error   29
docker exec -it rabbitmq rabbitmqctl purge_queue versioned_notifications.info
Purging queue 'versioned_notifications.info' in vhost '/'



The management plugin ships with a command line tool rabbitmqadmin which can perform some of the same actions as the Web-based UI, and which may be more convenient for automation tasks. Note that rabbitmqadmin is just a specialised HTTP client; if you are contemplating invoking rabbitmqadmin from your own program you may want to consider using an HTTP API client library instead.

curl -o rabbitmqadmin http://api-int.osism.local:15672/cli/rabbitmqadmin

Clusterer status

docker exec -it rabbitmq rabbitmqctl eval 'rabbit_clusterer:status().'
Rabbit is running in cluster configuration:
Running nodes: ['rabbit@testbed-node-0','rabbit@testbed-node-1']