Integration / RabbitMQ Interview Questions
Explain the internal working of RabbitMQ clustering?
A RabbitMQ cluster is a group of nodes that share certain broker state over Erlang's built-in distribution protocol, but it does not automatically replicate every queue's contents.
- Shared across the cluster: exchanges, bindings, users, permissions, and vhost metadata are synchronized to every node.
- Classic queues: a classic queue's actual message data lives on the single node that created it; other nodes just know how to proxy client requests to that owning node. If that node goes down, the queue (and its unreplicated messages) becomes unavailable until it recovers.
- Quorum queues: each quorum queue forms its own Raft group across a configured number of nodes, with one elected leader handling writes and followers replicating the log; the queue keeps working as long as a majority of its group is up.
Clients typically connect through a load balancer or a client-side node list, and their connection can land on any node regardless of where a given queue's data actually lives, since RabbitMQ routes internally.
More Related questions...