You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by jeremy <je...@gmail.com> on 2020/03/25 10:46:24 UTC

Poisoned message on qpid broker-j with a client that does prefetch

Hello,

We are using qpid broker-j version 7.1.6, and testing the poisoned message
feature.
From the doc, we saw that it is based on the maximum delivery count, and we
were wondering how the client side prefetch will impact this. For example,
qpid jms does a prefetch of 1000 messages by default. Also, if there is a
dispatch router between the client and broker, it will prefetch 250 messages
by default.

The scenario that we tested is the following:
The cluster:
- qpid jms client
- 1 qpid dispatch router with autolinks
- 1 qpid broker-j

We sent 250 messages to a queue, which was configured to have max delivery
count = 1.
A consumer then, consumed one message, and was closed.
We observed that all the remaining 249 messages were considered as poisoned
and deleted.
Even with a delivery count that is higher than 1, we still risk facing this,
if we have several consumers not consuming all the messages.

We were wondering if the prefetch has been taken into account. It made more
sense if the poisoned message was based on rejected deliveries instead of
delivery count. This way, if the client could not process the message, he
rejects it explicitely, and upon reaching the maximum, the message will be
deleted.


Thanks,
Jeremy



-----
Cheers,
Jeremy
--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Poisoned message on qpid broker-j with a client that does prefetch

Posted by jeremy <je...@gmail.com>.
Hi Alex,

Thanks for the reply.

In fact, was wondering why does the counter involve something automatic,
like the modified state when detaching, which causes a problem with
prefetch.

From what I understand, a poisoned message is something that the consumer
cannot process, so the client is supposed to explicitly reject such
messages, and the broker can handle the cleaning. Unless of course, I'm
missing something...

One last thing, we're using autolinks on the dispatch router, so we can't
have a prefetch 0.

Thanks,
Jeremy



-----
Cheers,
Jeremy
--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Poisoned message on qpid broker-j with a client that does prefetch

Posted by Oleksandr Rudyy <or...@gmail.com>.
Hi Jeremy,

The message delivery counter is incremented when the receiver settles the
delivery with Rejected or Modified outcomes.
The Modified outcome can be applied when the delivery is settled without
reaching a terminal state (Modified is a default outcome for the queue
sender termini) and when the receiving link is detached with close=true.

I guess that the receiving link was closed with prefetched messages. As
result, the delivery count was incremented for all prefetched messages.

Setting prefetch to 0 can minimise the risk of message deletion on reaching
delivery count limit due to a link close with prefetched messages.

Kind regards,
Alex




On Wed, 25 Mar 2020 at 10:46, jeremy <je...@gmail.com> wrote:

> Hello,
>
> We are using qpid broker-j version 7.1.6, and testing the poisoned message
> feature.
> From the doc, we saw that it is based on the maximum delivery count, and we
> were wondering how the client side prefetch will impact this. For example,
> qpid jms does a prefetch of 1000 messages by default. Also, if there is a
> dispatch router between the client and broker, it will prefetch 250
> messages
> by default.
>
> The scenario that we tested is the following:
> The cluster:
> - qpid jms client
> - 1 qpid dispatch router with autolinks
> - 1 qpid broker-j
>
> We sent 250 messages to a queue, which was configured to have max delivery
> count = 1.
> A consumer then, consumed one message, and was closed.
> We observed that all the remaining 249 messages were considered as poisoned
> and deleted.
> Even with a delivery count that is higher than 1, we still risk facing
> this,
> if we have several consumers not consuming all the messages.
>
> We were wondering if the prefetch has been taken into account. It made more
> sense if the poisoned message was based on rejected deliveries instead of
> delivery count. This way, if the client could not process the message, he
> rejects it explicitely, and upon reaching the maximum, the message will be
> deleted.
>
>
> Thanks,
> Jeremy
>
>
>
> -----
> Cheers,
> Jeremy
> --
> Sent from:
> http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>