Author |
Message
|
Goodfellas |
Posted: Fri Dec 17, 2010 9:46 am Post subject: Expiry |
|
|
Acolyte
Joined: 26 Feb 2009 Posts: 70
|
Hello,
Last edited by Goodfellas on Tue May 28, 2013 12:18 pm; edited 1 time in total |
|
Back to top |
|
 |
Vitor |
Posted: Fri Dec 17, 2010 9:50 am Post subject: Re: Message Expiry at MQ Level |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Goodfellas wrote: |
Is there any way to Set the Message Expiry at the MQ Level( Qmgr or Queue). |
No. Expiry is a message attribute, not a queue or queue manager attribute. It's individual & specific to a given message.
If a message has a shelf life, the putting application should know that (because it's part of the design) and set an expiry interval appropriate to the message content. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Dec 17, 2010 9:57 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
You could have the application(s) put their messages to a given queue. You could then read them off with a piece of custom code (or WMB as you've posted this in the WMB section), set the expiry to whatever you wanted and then put the message to whatever the real destination was.
Or buy software to do it for you.
Or trout your developers until they learn to set message options properly. You could instruct them on persistence at the same time as you instruct them on expiry. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Dec 17, 2010 10:02 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
And you won't get a different answer by asking twice  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Goodfellas |
Posted: Fri Dec 17, 2010 11:05 am Post subject: Expiry |
|
|
Acolyte
Joined: 26 Feb 2009 Posts: 70
|
Thx
Last edited by Goodfellas on Tue May 28, 2013 12:18 pm; edited 2 times in total |
|
Back to top |
|
 |
Vitor |
Posted: Fri Dec 17, 2010 11:23 am Post subject: Re: Message Expiry at MQ Level |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Goodfellas wrote: |
It is my understanding that even if the Putting Application set an expiry interval, the message will stay on the queue until a GET is performed. |
How did you obtain this understanding?
What would be the point of message expiry if a message with expiry set to a value stayed on the queue until it was read off?
Goodfellas wrote: |
What is triggering that purge of expired messages every 5 minutes |
The queue manager removing expired messages (assuming the expiry time is 5 minutes).
Goodfellas wrote: |
Correct me if I am wrong. |
You're wrong.
If the messages have a value more than 5 minutes after they were put, the expiry interval should reflect that. If they should survive until read off, they should not have expiry set at all. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Dec 17, 2010 11:27 am Post subject: Re: Message Expiry at MQ Level |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Goodfellas wrote: |
It is my understanding that even if the Putting Application set an expiry interval, the message will stay on the queue until a GET is performed. |
Or do you mean that you didn't expect messages to be removed until a get call was made against the queue?
That changed in v6 when the distributed queue managers started removing expired messages as the z/OS queue managers had been doing for some time.
In either event, pre or post v6 a message who's expiry has passed cannot be read off a queue even if it still happens to be sitting in the queue file. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Dec 17, 2010 11:29 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
MQ makes no documented guarantees on expired messages other than that they will not be returned to an MQGET call that would otherwise have received them.
Whether or not they stay on the queue after the period of time in which they are no longer eligible to be gotten has elapsed is a different question than whether or not they are expired. And the answer to that first question has changed as MQ has changed versions. |
|
Back to top |
|
 |
Goodfellas |
Posted: Fri Dec 17, 2010 1:27 pm Post subject: |
|
|
Acolyte
Joined: 26 Feb 2009 Posts: 70
|
Thx
Last edited by Goodfellas on Tue May 28, 2013 12:19 pm; edited 1 time in total |
|
Back to top |
|
 |
Vitor |
Posted: Fri Dec 17, 2010 2:20 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Goodfellas wrote: |
I disabled it by adding the below parameter in the qm.ini file and I see the messages are on the Queue till a GET is done.
|
Yes that would disable it. Why would you bother?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bsiggers |
Posted: Fri Dec 17, 2010 3:21 pm Post subject: ? |
|
|
Acolyte
Joined: 09 Dec 2010 Posts: 53 Location: Vancouver, BC
|
I have an awesome solution - please turn the qm.ini option you turned off, back on again. Messages will then start to disappear off the queue as they expire.
Problem solved! On that note, I'm going home. |
|
Back to top |
|
 |
|