Thanks you so much for your inputs Morag.
Yes your understanding is correct. We are working on application which will read the message from Queue X and deliver further to Queue A, B and so on the same QM.
Messages on the Queue X will deliver further based on some criteria which is defined within the Java Application. Application continuously sense the incoming messages on Queue X from external system. Messages which doesn't fits under that criteria will be discarded to Dead letter Queue. So as soon as message arrives to Queue X, necessary action is taken immediately.
We are in discussion to go with an option of retrying a message for few times and if failed in all attempts, then put the message to backout queue and process them once resources are available again. What is the recommended way of setting the retry intervals assuming we are planning to do 3 retries. Is it OK to set 5 secs wait time before every retry OR any recommended duration considering peak load (Million of incoming messages on Queue X).
Also, in case the backout queue also gets full, what options do you suggest would be best suited OR is recommended?
External system is mainframe which will send all messages to one specific Queue X on Linux platform. But there is no criteria set on mainframe for the message , whether it meant for application A, application B, and so on linux end. Hence ,we developed a solution which will filter out the messages based on some criteria from Queue X and send further to Queue A, B and so on. Application A, application B, and so on are the consumers of those messages from respective queues (A,B and so on). Any thoughts on improvising this as well ??
------------------------------
Anurag
------------------------------
Original Message:
Sent: Thu July 16, 2020 08:08 AM
From: Morag Hughson
Subject: MQ Undelivered Message Scenario
What you do when one (or more) of Queue A, B or C reject the MQPUT of a message onto it depends on a few criteria about your messages. Mainly ordering. Is it essential that the messages on Queue X remain in the same order when they are delivered downstream?
If order is not required, then one technique (utilised by MQ queue manager channels) is to retry a few times (just in case it is a transitory problem) and then to write the message to a side queue (called the Dead Letter Queue in the case of channels, or some applications use the Backout Queue for putting messages to one side) for later processing. Then you can get on with delivering messages to the queues that are still accepting messages.
You ask whether the message will rollback automatically to QueueX after some retries. Well that depends on what you code. Assuming that you get the messages from QueueX using Syncpoint (MQGMO_SYNCPOINT), then if you have a failure, you can roll the message back onto Queue X again using the MQBACK verb. However, if you are moving it to the side queue, then you won't need to roll back the message. I assume you are designing and writing the application that reads from QueueX and puts to Queues A,B&C?
Alternatively I suppose you might be using Message Broker, aka IBM ACE to do this routing? In which case it has all this sort of processing built in.
As to the side queue, you would also need to process that. You could in your application, keep track of whether messages to Queue A, which was previously failing to accept messages, is now back and open for business again, and you could then go and read from the side queue and grab all the side-lined messages. Alternatively, you could have a process a bit like the Dead Letter Queue Handler which periodically retries all the failed puts.
What are you using to determine which message goes to which queue?
Is there any reason why you want this staging queue, rather than using MQ channels to do all the above for you by having the External system use the Queue A,B&C queue names instead of QueueX?
Cheers,
Morag
------------------------------
Morag Hughson
MQ Technical Education Specialist
MQGem Software Limited
Original Message:
Sent: Thu July 16, 2020 07:11 AM
From: Anurag M
Subject: MQ Undelivered Message Scenario
Hi, We are designing a system where we are getting all messages on MQ queue 'X' from external system. From this queue 'X' messages are further routing to the respective systems queues 'A', 'B', 'C' on same Queue Manager which are later processed by several applications.
Now, i need below recommendations to design this kind of system. Attached is the sample design.
1. What if queue 'A', 'B', or 'C' are full or unavailable. Will message rollback automatically back to the queue 'X' after some retries OR how is that ? Looking for best approach we should follow.
2. If we have millions of messages coming on queue 'X' and because of unsuccessful delivery of one message to another queues 'A', 'B' on same QM; how the delay of delivery of unsuccessful message can be handled when resources (queues 'A', 'B') are available again.
Please suggest some good approach we can follow considering performance as well.
Any assistance would be much appreciated. Thanks!
------------------------------
Anurag
------------------------------