Hi,

we're trying to set up Broker J 7.1.4 / Qpid JMS 0.44.0 to retry messages on 
failure.
On broker side, the queue is set up with Maximum Delivery Attempts = 5.
On client side, we set a JmsDefaultRedeliveryPolicy with setMaxRedeliveries(5). 
The client is not transacted, using Session.AUTO_ACKNOWLEDGE.

If we detect an error in message processing, session.recover() is called. This 
has the effect that the client is retrying the message locally up to the set 
maximum on 5 before eventually releasing the message back to the broker. 
(outcome MODIFIED_FAILED_UNDELIVERABLE)

The problem is that the local retries on client side are apparently not 
reported to the broker. So, all these retries are counted as only 1 delivery on 
broker side.
The broker therefore transmits the message again with a delivery count of 2.
The client does its retries again... and this repeats until eventually the 
broker count has reached the maximum and the message goes to DLQ.

At that time the message has been processed 20(!) times rather than the 
configured 5 retries.

This seems to a bug in the implementation or a flaw in the protocol? Is there 
any way to configure this in a way that only 5 retries total are done?


The only working solution we've found is to use transactions and do a rollback 
on a bad message. Given that we're not using any transaction features otherwise 
it seems to be a high overhead for a seemingly simple retry logic?

Thanks
Timo

Reply via email to