Anton Sidorov homepage

Bookmark this to keep an eye on my project updates!

Follow me on GitHub

RMQ Virtual host

Зачем

RabbitMQ is multi-tenant system: connections, exchanges, queues, bindings, user permissions, policies and some other things belong to virtual hosts, logical groups of entities.

  • Virtual hosts provide
    • logical grouping and separation of resources
    • Separation of physical resources is not a goal of virtual hosts and should be considered an implementation detail.
      • RabbitMQ vhosts are like a virtual machine for a physical server, allowing for multiple secure application operations through virtual rather than physical separation. As the separation is virtual, it is important to remember that the vhosts are not physically separated from each other and therefore they might affect each other’s performance.
  • Virtual Hosts are used to isolate resources. A determined resource (e.g. exchanges, queues) can be used by more than one virtual host.
  • In AMQP, a Virtual Host (a.k.a. ‘vhost’) is a namespace for objects like Exchanges, Queues and Bindings
  • RabbitMQ provides 2 mechanisms to apply segregation.
    • Virtual hosts
    • queues
  • A virtual host can be created per microservice which will hold all the logical infrastructure definitions like Queues, Exchanges, users etc. This is a good practice as this allows the teams to manage their own AMQP topologies

Технологии

Support multi bus, virtual host