MQ JMS - redelivery not working in case of rollback
posted 1 year ago
We are using MQ JMS standalone client application (NO app server) to consume WebSphere MQ messages. Our Queue definition is as follows:
APP_QUEUE1 - (QA, PUT enabled)
APP_QUEUE1.CL - (QL and target of above APP_QUEUE1)
APP_QUEUE1_BOQ - (QA and BOQNAME of APP_QUEUE1.CL, PUT enabled)
APP_QUEUE1_BOQ.CL - (QL and target of above APP_QUEUE1_BOQ )
BOTHERH of APP_QUEUE1 = 3.
With above set up, when exception occurs for the first time, I am getting exception saying backout queue is not defined and attempt to add to dead letter queue also fails. Can someone explain why message is not getting recede to main queue (APP_QUEUE1) even though BOTHRESH is 3.
My understanding is, in case of exception, message will be recede to APP_QUEUE1 3 times and after that it will be routed to back out queue. If back out queue is full or fails then only message is added to dead letter queue.
application is using MQ JMS api. (version 7.0). I have set BOTHRESH and BOQNAME attributes and using season transacted mode. However, when an exception occurs, at the first time itself, i see error MQJMS1080 - MQJMS1080 No Backout-Requeue queue defined.due to this it tries to put message to dead letter queue which also failed as there's no put permission on it.
However, i do not understand why message is not re-queued to original queue until BOTHRESH limit is met ? why its trying to add message to blackout queue in the first attempt itself ? and why it says no blackout queue defined even though i have set it in queue definition.
Can someone please answer if there's anything wrong with queue definition ? Or something needs to be done in the application code ?