On 02/02/2016 09:08 PM, jjw tectec wrote:
Sorry the image didn't show up. My broker setup was below:
Bs Queue
|---------> B1->Exchange->Queue |---------------->Bd Exchange
| |
|------> B2->Exchange->Queue ---|
Ok, understood now. I was barking up the wrong tree earlier.
Since between Bs and Bd there are two alternative routes, I was expecting
messages to be duplicated in the two routes (according to the behavior
described in the C++ Broker Manual).
They won't be duplicated, but they should be shared between the two
queues in B1 and B2 (meaning that order is lost on Bd).
Can you run qpid-stat -e and qpid-stat -q against all four brokers
(after sending through some defined number of messages)? What do the
stats for each show?
The actual behavior was: only the first established route had the messages.
I followed your suggestions (by adding ack and sending large numbers of
messages in a loop), but observed the same behavior: Route 1 was the only
route receiving all messages. If I shut down B1, then messages are queued
up in Bs's Queue until B1 is brought up again.
I remember that some time ago, I did see round robin kind of behavior (B1
and B2 were getting messages alternately), with a slightly different test
setup. Now I can not replicate that anymore.
Your figure below suggested creating individual queues for each downstream
broker. This is not what I wanted. I wanted a single queue in the upstream
broker, and the desired behavior that my application need is:
Messages will flow through the first established route, say B1. But
whenever B1 is down, then messages would automatically switch to the second
route, say B2. (we need a "one and only one route" kind of behavior).
Is this something I could achieve using static queue routes alone?
No. The expected behaviour is for messages to flow down each route
(though from what I understand that is not happening for you?). Also if
one broker goes down, then it would take down any messages it has queued.
I've
felt that I probably need to write a shovel module between Bs and B1/B2 to
make the selection or any load balancing happen.
If I'm heading in a wrong direction, please kindly suggest a good path. :)
qpid dispatch router was designed from the outset to handle redundant
paths. Have you looked at that yet?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]