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 <[email protected]> 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: [email protected] > For additional commands, e-mail: [email protected] > >
