Description of problem:
We have four brokers in topology A,B,C,D on all of them we have the same exchange E and queue Q , Q is bound to E with the same routing key on all brokers. Lets have "Queue route" from A(Q) -> B(E), A(Q) -> C(E), B(Q) -> D(E), C(Q) -> D(E). When we publish 5 messages on A, then usually we can see 2 messages on B(Q), 3 messages on C(Q), 5 messages on D(Q). The problem lays in B and C where i would expect 5 messages in their Q.
A -----> B -----> D
`---> C -----/
Version-Release number of selected component (if applicable):
If batch of N of messages is published on A it does not appear on B,C as N messages on B and N messages on C, but the batch on A is split between them (as they are read from Q on A)
If batch of N of messages is published on A it should appear as N messages on B(E) and C(E). Or documentation should state about such situation, when two Queue routes are pulling messages form one queue.
What you are seeing is expected behavior. You have created "queue" routes from A -> B and A -> C. Both routes feed from the same queue on A. This is a load-balancing scenario. In other words, both B and C have subscriptions to A.Q. When there are multiple subscriptions on an AMQP queue, the messages are distributed among the subscribers.
If you want fanout behavior (i.e. 5 messages to both B and C), you should use an exchange route from A.E.
(In reply to comment #1)
> What you are seeing is expected behavior. You have created "queue" routes from
> A -> B and A -> C. Both routes feed from the same queue on A. This is a
> load-balancing scenario. In other words, both B and C have subscriptions to
> A.Q. When there are multiple subscriptions on an AMQP queue, the messages are
> distributed among the subscribers.
> If you want fanout behavior (i.e. 5 messages to both B and C), you should use
> an exchange route from A.E.
[ RFE ] Messaging User Guide - Chapter 8.1.1. Queue Routes
conclusion from comment #1 should take place in documentation
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
When there are multiple subscriptions on an AMQP queue, messages are distributed among subscribers. For example, two queue routes being fed from the same queue will each receive a load-balanced number of messages. If fanout behaviour is required instead of load-balancing, use an exchange route.
This bug is now documented in the release notes and can be viewed at the below link: