0

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.

Can someone please answer if there's anything wrong with queue definition ? Or something needs to be done in the application code ?

mformusic
  • 41
  • 1
  • 5
  • What is the exception you suffer? Does your application roll back or just abend? – Morag Hughson Nov 14 '14 at 22:32
  • I get exception only once with error message as MQJMS1080 No Backout-Requeue queue defined. And message is deleted from maim queue but not retried or added to back out queue – mformusic Nov 15 '14 at 04:51
  • Can you provide fuller queue definitions? Your description suggests you have BOQNAME on an alias queue which is not possible. – Morag Hughson Nov 15 '14 at 19:52
  • Hi Morag, thank you for responding to my query. Unfortunately i do not have access to get full queue definition. But BOQNAME is set on APP_QUEUE1.CL only. But while setting BOQNAME , alias of backout queue is set i.e APP_QUEUE1_BOQ is set as BOQNAME for APP_QUEUE1.CL. Do i need to set APP_QUEUE1_BOQ.CL as blackout queue name ? i thought giving alias as back out queue should work. – mformusic Nov 16 '14 at 06:59
  • It wasn't that your backout queue was itself a QAlias that I was questioning, it was that you said your BOQNAME was set on an alias queue APP_QUEUE1, which is not possible, and also you said you were getting an error which said MQJMS1080 No Backout-Requeue queue defined. Can you update your question to include the correct information. – Morag Hughson Nov 17 '14 at 09:00
  • I have updated it. However, the reason for message not getting re-queued to the original queue is this exception. I have set BOTHRESH and BOQNAME , and using session transacted mode. I don't understand why message is not routed to original queue again, until BOTHRESH limit is met. Once bothersh count equals redelivery count, i expect the message to be added to backout queue – mformusic Nov 17 '14 at 17:40
  • Why do you believe that the requeue is happening on the first backout? These happen within milliseconds so you would need an API trace to determine that it is, in fact, occurring on the first backout. (Because the message can be backed out before the app ever sees it so an app log won't necessarily show the backout.) If you have anything to substantiate why you believe this happens on the first backout, please post it in the question. – T.Rob Nov 17 '14 at 20:09
  • Hi Rob, thanks for the reply. I thought when redelivery happens to the original queue, onMessage method of my listener will be called again. I have log statements in my onMessage method which could be useful, since i am logging JMSXDelivreyCount and isRedelivred flag. I don't see any such logs in my app logs ....but now as per your comment, are you saying onMessage will not be called in case of redelivery ? On another note, not sure why its giving MQJMS1080 error even though i have defined back out queue. Appreciate your help. – mformusic Nov 18 '14 at 03:40

0 Answers0