View previous topic :: View next topic
|
Author |
Message |
ibmmainframe1
New User
Joined: 26 Jul 2005 Posts: 64 Location: India
|
|
|
|
How to set timeout parameter as 15mins for MQ messages. |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
Please explain your request. Is this for waiting to GET MSGs? |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Options are either Expiry, in tenths of a second or WaitInterval in thousandths or a second. The former is set in MQMD whend MQPUTting the message, the latter in the MQMD in conjunction with MQGMO_WAIT in Get Options.
Garry |
|
Back to top |
|
|
ibmmainframe1
New User
Joined: 26 Jul 2005 Posts: 64 Location: India
|
|
|
|
Hi Garry & Bill,
Thanks for your quick responses.
My MQPUT call looks like this. Pls advise where to add the timeout parameter. I appreciate it.
Code: |
CALL "MQPUT" USING WS-HCONN-HANDLE
WS-HOBJ-HANDLE
MQMD
MQPMO
WS-DATALENGTH
FORMATTED-OUTPUT-MSG-XML
MQCFH-COMPCODE
MQCFH-REASON
END-CALL |
|
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Since this is an MQPUT, you are speaking of an Expiry Interval, not a timeout.
Code: |
MQMD.Expiry = 9000; /* 15min * 60sec * 10 */ |
What MQMD are you going to use for an MQGET for a reply?(if you expect one). Don't re-use the same MQMD - that's asking for trouble.
Garry. |
|
Back to top |
|
|
ibmmainframe1
New User
Joined: 26 Jul 2005 Posts: 64 Location: India
|
|
|
|
Hi Garry thanks a lot for your response.
My understanding is
Expiry & non-persistence should go together.
Pls correct me.
Thanks. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Quote: |
My understanding is
Expiry & non-persistence should go together.
|
Your understanding is incorrect. Expiry applies to both persistent and non-persistent messages and specifies the interval after which MQ is to discard a message. An expired message can contribute to queue-depth, but is inaccessible to applications pending its actual removal from the queue.
Persistence/non-persistence determines whether a message survives a restart of the QueueManager - non-persistent messages are lost on QueueManager restart, regardless of Expiry setting.
It is likely, where persistence is required, that the Expiry should also be set to MQEI_UNLIMITED.
Garry. |
|
Back to top |
|
|
ibmmainframe1
New User
Joined: 26 Jul 2005 Posts: 64 Location: India
|
|
|
|
Thanks for clear explanation Gary. |
|
Back to top |
|
|
|