What is the meaning of the vhost in RabbitMQ?

Viewed 13280

When I set permissions to the rabbitmq user, there is output the vhost:

[root@ha-node1 my.cnf.d]# rabbitmqctl set_permissions openstack ".*" ".*" ".*" 
Setting permissions for user "openstack" in vhost "/" ...

What is the meaning of the vhost when I set permission, and what function does it have?

2 Answers

Let me say this by giving you an analogy.

  • Vhosts are to Rabbit what virtual machines are to physical servers: Vhosts allow you to run data for multiple applications safely and securely by providing logical separation between instances.

  • This is useful for anything from separating multiple customers on the same Rabbit to avoiding naming collisions on queues and exchanges. Where otherwise you might have to run multiple Rabbits

  • Every RabbitMQ server has a ability to create virtual message brokers called virtual hosts (vhosts). Each one is essentially a mini-RabbitMQ server with its own queues, exchanges, and bindings ... etc, more important, with its own permissions.

For details information ref: https://livebook.manning.com/book/rabbitmq-in-action/chapter-2/

Related