On Thu, Jul 11, 2019 at 10:37 AM Rabih M <[email protected]> wrote:

> Hello,
>
> We are using Qpid dispatch router 1.7, Qpid broker 7.1.3 on redhat linux
> rhel 6.4.
>
> Use case description:
> We have a cluster of 2 dispatch routers and 2 brokers. A sharded queue
> "myQueue" on the 2 brokers.
> Here is an illustration:
>
> [image: Diagram.jpg]
>
> The producer produces 2 messages, the messages are load balanced on the 2
> brokers. Then, Consumer 1 and consumer 2 ask for a receive().
>
Does your receive() function issue one credit per call?

>
> Our observation is that the consumer 1 consumes the first message and the
> consumer 2 is never getting the second message.
> We are aware that the first dispatch router will do a prefetch for the 2
> messages but what is weird is that the prefetched message 2 is never routed
> to the second dispatch router and consumer 2.
> I attached the dispatch routers config.
>
> This is what is going on in my view -
1. The producer sends two messages - Message 1 goes to Broker 1 and Message
2 goes to Broker 2.
2. Now Consumer 1 attaches to Router 1 and calls receive() issuing one
credit. (The Consumer 2 has not yet attached to Router 2). The autolinks
from Broker 1 to Router 1 and Broker 2 to Router 2 each have a prefetch of
250 credits each. So,Message 1 and Message 2
both come down to Router 1. Message 1 is sent to Consumer 1. Message 2 is
waiting on the outbound queue of Consumer 1 waiting to receive a credit
from Consumer 1.
3. Now Consumer 2 shows up and wants to receive Message 2 but that message
is already queued up to go to Consumer 1 who is still keeping his
connection open
4. If now Consumer 1 drops out, the Message 2 will be RELEASED back to its
broker and that message will be sent to Consumer 2.

Have you tried attaching Consumer 1 and Consumer 2 first and then
subsequently bringing up the Producer 1 and send two messages ? In that
case, I think, both consumers will receive one message.

Thanks.

> Do you have any idea how we can make consumer 2 receive the message?
>
> Thanks for your help,
> Rabih
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]

Reply via email to