Thank you Gordon. I had played a little with dispatch routers some time
ago. I'll see how I can make use of it, along with the brokers, to achieve
the desired behavior.
I followed your suggestion and ran "qpid-stat -q" "qpid-stat -e" on the 4
brokers. The below data match the observation: Only B1 was seeing all the
100 messages that were generated. Qpid-stat results were the same whether
"ack" option was used or not.
queue dur autoDel excl msg msgIn
msgOut bytes bytesIn bytesOut cons bind
=========================================================================================================================
(Bs)TestQueue Y 0
100 100 0 8.10k 8.10k 1 1
exchange type dur bind msgIn msgOut msgDrop byteIn
byteOut byteDrop
===========================================================================================
(B1)TestExchange topic Y 2 100 100 0 9.30k
9.30k 0
(B2)TestExchange topic Y 2 0 0 0 0
0 0
queue dur autoDel excl msg msgIn
msgOut bytes bytesIn bytesOut cons bind
=========================================================================================================================
(B1)TestQueue Y 0
100 100 0 9.30k 9.30k 1 3
(B2)TestQueue Y 0
0 0 0 0 0 1 3
exchange type dur bind msgIn msgOut msgDrop byteIn
byteOut byteDrop
===========================================================================================
(Bd)TestExchange topic Y 0 100 0 100 9.30k
0 9.30k
On Tue, Feb 2, 2016 at 5:02 PM, Gordon Sim <[email protected]> wrote:
> 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]
>
>