"I understand this is a bad architecture to use the same destination queue for everything, but this is what has been designed and is in use since long time.
Any thoughts or comments how to effectively improve in getting the messages without impacting the authorizations??"
How many concurrent consumer applications are servicing the z/OS queue? If each message is a transaction, then look at the possibility of launching multiple consumer applications. Mainframes are provisioned to support hugely concurrent workloads.
Original Message:
Sent: Fri November 01, 2024 01:29 AM
From: Francois Brandelik
Subject: How to set Message priority for a message on a queue
Well all depends on the max time it takes to process a message of the C category.
So assume all the threads are busy processing messages of the C category.
A message of the A or B category hits the queue. It will not be processed until a thread that is processing a message of the C category is available for doing the next MQGET.
So your time out needs to be greater than the time needed to process a message of the C Category...
Assuming your MF application can keep up processing the authorizations it get at 8 (5 + 3) TPS, it will take 125 ms per message (assuming a single thread)
For the batch 3K messages in 14 mins it takes 3.572 TPS or 280 ms per message (assuming a single thread)... At 30 threads, you are past your message timeout...
And you might also want to make sure that the channel XMITQ is set to Priority and not FIFO...
The alternative of course is to create 2 queues, one for authorizations and one for processing.
------------------------------
Francois Brandelik
Original Message:
Sent: Thu October 31, 2024 09:09 AM
From: vishal kumar kalava
Subject: How to set Message priority for a message on a queue
Hello @bruce2359 & @Rich Harran
Thank you for sharing me with all the details!!
Bruce for you question..
Q: Do you mean change MESSAGE priority?
Yes, I am changing the MESSAGE priority of the Remote queue using the MQ explorer
Q: By "it" do you mean the MESSAGE? If so, what exactly is the message priority of the message that arrives on the z/OS MQ queue?
Ans: I revalidated the message priority of the messages landing on the queue which resides on MF, it is now carrying the priority. I was not seeing the priority as the application team provided me with the wrong queue name to change priority on the QMGR.
Q:Does the queue on z/OS MQ specify message delivery sequence PRIORITY of FIFO? If FIFO, priority is ignored at MQGET.
Ans : Yes, message delivery sequence is set to PRIORITY on MF QMGR.
Q: "... not working ..." is not precise. What did you expect to see? What did you see?
A: If you see below picture, I see the priorities aligned as expected, if the messages have same priority then they followed FIFO, and if they have different priorities, then they followed the PRIORITY based positions. This is what I expected on the MF queue manager as well.
Update after changing the queue Priority on the right queues.
· I changed the Default Priority on the Queue (Consider A.REM) to 6, another Queue to 5(Consider B.REM) and C.REM to default 0.
· When I asked the application team to set the priority using MQMD, they are not aware of that and are saying that they are directly putting the messages on the queue.
· I could now see the messages going from Distributed to Mainframe Queue managers are carrying the queue priority for the associated messages. Destination Mainframe queue (MF.QUEUE)
· However, the Authorizations are getting impacted due to their time outs set as 8 seconds.
o As per testing they are sending 5tps(Transactions per second) using A.REM queue to MF.QUEUE, 3tps using B.REM to MF.QUEUE and during that is happening, IIB is sending 3k to 4k messages at once using C.REM to the MF.QUEUE.
o So 3 different remote queues, pointing to the same Mainframe Queue.
§ A.REM used for authorizations. (These are getting impacted)
§ B.REM used for authorization. (These are getting impacted)
§ C.REM used for sending 3k messages not authorizations.
o We are seeing authorization timeouts, when the newly created C.REM queue is used by IIB application to send 3k to 4k messages at once to the destination queue.
o Application which is taking off these messages based on priority is very slow, for an idea to get the messages by the corresponding application on the Mainframe, it is taking 14mins to get the 3k messages. During that time even though the priority is being set correctly on the messages, we are seeing huge impact on the authorization timeouts.
I understand this is a bad architecture to use the same destination queue for everything, but this is what has been designed and is in use since long time.
Any thoughts or comments how to effectively improve in getting the messages without impacting the authorizations??
------------------------------
vishal kumar kalava
Original Message:
Sent: Fri October 25, 2024 01:32 PM
From: bruce2359
Subject: How to set Message priority for a message on a queue
Not a counterpoint. The OP seemed unclear about a queue, queue properties, and message properties.
My strongest recommendation is NOT to use the _AS_QDEF values, as use of these needlessly abstracts and complicates postmortem debugging.
My recommendation is that the app first instantiate an IBM-provided MQMD (copybook in COBOL, include-file in C, etc.); then create a working MQMD copy within the app; then explicitly set all of the MQMD fields in the working copy, and set application data payload to appropriate values; then MQPUT the message. Explicitly here means set MQMD message priority to 5, message persistence to persistent, and not use and rely on the _AS_QDEF.
Original Message:
Sent: 10/25/2024 4:17:00 AM
From: Rich Harran
Subject: RE: How to set Message priority for a message on a queue
- Changing the properties (object attributes) of a remote queue object doesn't change the attributes of the target object
- Priority is only set from the default priority of the queue when the priority in the MQMD is set to MQPRI_PRIORITY_AS_Q_DEF (-1), which is the value in the default MQMD. Once it has been set from the default priority of the remote queue definition, it will have a different value, so it won't be changed again when it arrives at the target queue. If it is already set to something other than MQPRI_PRIORITY_AS_Q_DEF when it is put to the remote queue, then it won't be changed from that value.
- MSGDLVSQ(PRIORITY) needs to be set on the target queue. MSGDLVSQ is not a valid attribute on a remote queue object.
- Message priority only effects the message delivery sequence of messages that are committed on the queue when the MQGET is done. If you have a lot of low priority messages on the queue, and no high priority ones, then your transactions will start processing those. When a high priority message arrives, the next transaction that does an MQGET will get that instead of one of the low priority ones, but there might be some delay if everything is busy already processing the low priority work.
------------------------------
Rich Harran
Original Message:
Sent: Thu October 24, 2024 05:04 PM
From: vishal kumar kalava
Subject: How to set Message priority for a message on a queue
Have one more question!!
We are trying to change the priority on the remote queue properties to suppose say 5, when the message landing on the remote queue manager which is on the mainframe is not carrying the priority.
Is there a get that priority forwarded to the Mainframe Queue manager.
I tested the scenario between two distributed queue managers and its working; however this is not working between distributed QMGR and the Mainframe QMGR.
------------------------------
vishal kumar kalava
Original Message:
Sent: Thu October 17, 2024 10:54 AM
From: vishal kumar kalava
Subject: How to set Message priority for a message on a queue
Thanks @Bob Gibson, that's all I wanted to know.
You guys are awesome :-)
------------------------------
vishal kumar kalava
Original Message:
Sent: Thu October 17, 2024 10:29 AM
From: Bob Gibson
Subject: How to set Message priority for a message on a queue
Vishal:
Q: Does that explicit priority set on the messages (MQMD) overwrites the default priority (0) set on the Distributed Remote queue?
A: In my experience with the MQ product, an explicit value provided when messages are PUT to a queue will take precedence over a default queue attribute value.
Bob
------------------------------
Bob
Original Message:
Sent: Thu October 17, 2024 10:24 AM
From: vishal kumar kalava
Subject: How to set Message priority for a message on a queue
Thanks @Rich Harran & @Francois Brandelik for your valuable inputs.
I just checked the existing settings for the queue, I see the ABC.AUTH queue on mainframe is already set to PRIORITY, and possible changes I need to make is to change the priority of the messages using the explicit priority can be set on the message MQMD.
Does that explicit priority set on the messages (MQMD) overwrites the default priority (0) set on the Distributed Remote queue?
Best Regards,
Vishal
------------------------------
vishal kumar kalava
Original Message:
Sent: Thu October 17, 2024 05:43 AM
From: Rich Harran
Subject: How to set Message priority for a message on a queue
You also need to make sure that the MSGDLVSQ (message delivery sequence) for the queue ABC.AUTH is set to PRIORITY, otherwise the priority in the MQMD is ignored.
------------------------------
Rich Harran
Original Message:
Sent: Thu October 17, 2024 05:02 AM
From: Francois Brandelik
Subject: How to set Message priority for a message on a queue
Vishal,
You can set the priority different ways. A default priority can be set on the remote queue used on distributed. An explicit priority can be set on the destination (JMS) or an explicit priority can be set on the message (MQMD) or JMS message properties (msg.setPriority(int i) ).
Enjoy
------------------------------
Francois Brandelik
Original Message:
Sent: Wed October 16, 2024 04:26 PM
From: vishal kumar kalava
Subject: How to set Message priority for a message on a queue
Hey All,
We have a queue : consider(ABC.AUTH) On the mainframe queue manager, which is a shared queue , spanning across four queue managers.
QM1: TO.ABC.AUTH (distributed QMGR)
QM2: ABC.AUTH( Mainframe QMGR)
We are sending messages in a batch ( consider 10k messages) from QM1 TO QM2, and they will be picked up by CICS program.
the mainframe queue is like a bridge queue and is used by different programs. (one is validating the authorization of card payments) .
Question here is, is there anyway we can set the low priority to the message that are coming through the batch, such a way it allows the other Authorization transactions to go through (without getting timed out which is now set at 10 secs).
Note: On our testing , when we sent a batch of 10k records to that mainframe queue(ABC.AUTH) and concurrently we ran the authorization messages, at first we could see the success, but eventually all got timed out, since the messages are all set to priority and are going out on FIFO basis.
Thanks,
vishal
------------------------------
vishal kumar kalava
------------------------------