RabbitMB sheet cheat


Queue management

List all queues

   $ rabbitmqctl list_queues

App management

Stop RabbitMQ app

   $ rabbitmqctl stop_app

Start RabbitMQ app

   $ rabbitmqctl start_app

Users management

List RabbitMQ users

   $ rabbitmqctl list_users


Get RabbitMQ status

   $ rabbitmqctl status

Get Cluster status

   $ rabbitmqctl cluster_status

Cluster management

Set Cluster name

   $ rabbitmqctl set_cluster_name $(NAME)

Joining the cluster

   $ rabbitmqctl join_cluster rabbit@$(NODE_SHORT_NAME)

Option :

  • --ram: Add node as a ram node

Changing the node type

   $ rabbitmqctl change_cluster_node_type $(NODE_TYPE)

Vhost management

List vhost

   $ rabbitmqctl list_vhosts

Create vhost

   $ rabbitmqctl add_vhost $(VHOST_NAME)

Delete vhost

   $ rabbitmqctl delete_vhost $(VHOST_NAME)


An Erlang cookie should be in on server.

On a linux server the erlang cookie should be in /var/lib/rabbitmq/.erlang.cookie

Add node to cluster

We asume than have those servers rabbit1, rabbit2 and rabbit3. We add rabbit2 and 3 in the cluster.

   $ rabbitmqctl stop_app
   $ rabbitmqctl reset
   $ rabbitmqctl join_cluster rabbit@rabbit1
   $ rabbitmqctl start_app