2
votes

Does RabbitMQ do round robin distribution of messages in following situation ?

RabbitMQ configuration :

  1. Exchange type - Topic
  2. Routing key - notify.#

Producer is pushing the message to above exchange with following different topics-

notify.log.# , notify.status.#, notify.priceChange.#

There are 4 consumers are running on different servers.

  1. 3 consumers are doing the same processing and running on different instance of same application under a load balancer.(They want to consume every message pushed by producer)

    They are listening to "notification_queue" attached with routing key "notify.#".

  2. Remaining 4th consumer is doing some different processing than first 3 consumers and running on different server(of different application).

    It is listening to "log_queue" attached with routing key "notify.log.#".

Will RabbitMQ distribute message in round robin fashion in first 3 consumers(in point 1)?

Please help.

1
Yes, it's round-robin, just be aware that if one consumer hangs, the others will still receive messages. So it's not a "fair dispatch". But on average, and over time, they should get the same amount of messages.Martin Wickman

1 Answers

1
votes

Yes indeed , does not matter what is the point of a origin of consumer . When we have multiple consumers on the same queue then the distribution is round robin , you can try it out in the simulator here http://tryrabbitmq.com/