1

In a RabbitMQ Quorum Queue (using raft) cluster of say 4 nodes (N1-N4),

Can I have a consumer that can read only from N1/N2? In this case, will a message produced in N3, be delivered to a consume via N1/N2?

As per the documentation from the below post: https://www.cloudamqp.com/blog/2019-04-03-quorum-queues-internals-a-deep-dive.html

With Raft, all reads and writes go through a leader whose job it is to replicate the writes to its followers. When a client attempts to read/write to a follower, it is told who the leader is and told to send all writes to that node. The leader will only confirm the write to the client once a quorum of nodes has confirmed they have written the data to disk. A quorum is simply a majority of node

If this is the case, How can scaling be achieved if it's just the leader node that's gonna do all the work?

Jerald Baker
  • 1,121
  • 1
  • 12
  • 48

1 Answers1

1

First of all, RabbitMQ clusters should have an odd number of nodes, so that a majority can always be established in the event of a network partition.

Consumers can always read from any node in a RabbitMQ cluster. If a queue master/mirror is not running on the node to which the consumer is connected, the communication will be forwarded to another node.

How can scaling be achieved if it's just the leader node that's gonna do all the work?

"scaling" is so non-specific a word that I hesitate to answer this. But I assume you're asking what happens with multiple quorum queues. The answer is that each queue has its own leader, and these leaders are distributed around the cluster.


NOTE: the RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.

Luke Bakken
  • 8,993
  • 2
  • 20
  • 33