Author |
Message
|
goffinf |
Posted: Fri Apr 17, 2009 3:31 am Post subject: Message Expiry |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
MQ version : 6.0.2.5
Platform(s) : AIX and Windows
If a message has Expiry set to a positive integer value lets say 600 (1 minute), does the QMgr automatically remove these messages from the queue as some sort of background 'clean up' task ?
Thanks
Fraser. |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Fri Apr 17, 2009 3:40 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
Expired messages will be removed when they are browsed or attempted to be gotten using a get |
|
Back to top |
|
 |
Vitor |
Posted: Fri Apr 17, 2009 3:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
WMBDEV1 wrote: |
Expired messages will be removed when they are browsed or attempted to be gotten using a get |
Or by a scavenger process which runs on later versions of WMQ and all versions of z/OS.
But in all cases automatically. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
JosephGramig |
Posted: Fri Apr 17, 2009 3:54 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
At 6025, I believe there is a process that will remove the msgs even without browsing the queue except for z/OS. |
|
Back to top |
|
 |
goffinf |
Posted: Fri Apr 17, 2009 5:55 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
Ah thanks, I thought that might be the case.
Is there any way of telling whether the scavenger process is actually running (obviously I can look at my queue in MQ Explorer or something and wait and see if messages disappear, but I'm not sure that if that product is periodically browsing the queue it would cause the expired messages to be removed as per WMBDEV1 suggestion - so it isn't the same behaviour as it would be in a live environment) ?
Thanks
Fraser. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Apr 17, 2009 6:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
goffinf wrote: |
obviously I can look at my queue in MQ Explorer or something and wait and see if messages disappear |
Even that won't work - on non-z/OS platforms the process runs when the queue manager decides it's a good idea, this behavior is non-configurable and hard to predict.
goffinf wrote: |
I'm not sure that if that product is periodically browsing the queue it would cause the expired messages to be removed as per WMBDEV1 suggestion - so it isn't the same behaviour as it would be in a live environment) |
What product? The queue manager clean up doesn't browse anything. If your reading application is periodically browsing or reading the queue the messages will go, if it's not the process will clean them up eventually and no matter what happens, the next time any process does a get from the queue it won't be given an expired message.
If you're so short of disc space for the queue file you need expired messages removed asap, buy more disc.
And why would a queue manager behave differently in a live environment? How would it know?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
goffinf |
Posted: Fri Apr 17, 2009 6:06 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
Quote: |
What product? The queue manager clean up doesn't browse anything. |
I meant MQ Explorer. It periodically refreshes it views which may trigger the clean up.
Quote: |
And why would a queue manager behave differently in a live environment? How would it know? |
It doesn't. I meant that we can't browse production queues with MQ Explorer.
Quote: |
the process will clean them up eventually and no matter what happens, the next time any process does a get from the queue it won't be given an expired message. |
Yeh, thanks, thats the critical point.
Fraser. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Apr 17, 2009 11:14 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
goffinf wrote: |
Quote: |
What product? The queue manager clean up doesn't browse anything. |
I meant MQ Explorer. It periodically refreshes it views which may trigger the clean up. |
No. It gets a new list of queues and info, but doesn't get or browse messages automatically.
goffinf wrote: |
I meant that we can't browse production queues with MQ Explorer. |
Yes you can. Or use any of the other support pacs or tools. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
goffinf |
Posted: Fri Apr 17, 2009 11:22 am Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
Quote: |
No. It gets a new list of queues and info, but doesn't get or browse messages automatically. |
Oh ok, thats useful to know.
Quote: |
Yes you can. Or use any of the other support pacs or tools |
OK, I didn't mean that in the sense of the tools don't work, I meant our production support guys don't *allow* it - sheesh !
Fraser. |
|
Back to top |
|
 |
gbaddeley |
Posted: Fri Apr 17, 2009 4:07 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
FYI, for z/OS, refer to the commands
ALTER QMGR EXPRYINT(n)
REFRESH QMGR TYPE(EXPIRY) NAME(generic-object-name)
and the description of Expiry in the App Prog Ref manual. _________________ Glenn |
|
Back to top |
|
 |
MQEnthu |
Posted: Wed Jun 17, 2009 10:05 pm Post subject: |
|
|
 Partisan
Joined: 06 Oct 2008 Posts: 329 Location: India
|
Hi Vitor, need a clarification on scavenger process you have mentioned here. Is it there on all the platforms, say Windows. I checked the V7 documentation, but it does not say anything about that.
Vitor wrote: |
Or by a scavenger process which runs on later versions of WMQ and all versions of z/OS. |
The V7 documentation syas wrote: |
After a message’s expiry time has elapsed, it becomes eligible to be discarded by the queue manager. The message is discarded when a browse or nonbrowse MQGET call occurs that would have returned the message had it not already expired. |
_________________ -----------------------------------------------
It is good to remember the past,
but don't let past capture your future |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 18, 2009 12:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
MQEnthu wrote: |
Hi Vitor, need a clarification on scavenger process you have mentioned here. Is it there on all the platforms, say Windows. I checked the V7 documentation, but it does not say anything about that.
|
I'll accept the word of the previous poster that this was introduced in v6.0.2.5.
I'm disapointed but not surprised to discover there's no mention of it in the documentation. There's not that much point as it's not configurable on any platform except z/OS (as posted above) and is simply an efficientcy change. Previously if a queue has been left unread and a large number of messages have expired, the first read would experience some delay as the queue manager went through looking for the first non-expired message; now it's likely that the expired message would be cleaned off and the first read much quicker.
The behaviour of expired is exactly as described in the doc, and as discussed above. All that's happening is that later versions of WMQ have a behind-the-scenes improvement, as they have for many of the functions. From the front, it all looks the same. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jun 18, 2009 4:19 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The documented behavior for expired messages is "They are not eligible to be gotten".
In MQ v5, distributed qms left expired messages in the q file until someone attempted to get them, and then they were destroyed, on z/OS there was a scavenger, with some additional control parameters for it.
In v6 and later, this scavenger was added to distributed but with no control parameters.
This scavenger is not documented for distributed because that would mean it was subject more levels of requirements and change control processes than it really warrants, and it does not in any way affect the documented behavior of expired messages... which is "nobody can get a message once it's expired". |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Jun 18, 2009 9:26 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
If you want "proof" that this mysterious process exists, look at your QM error logs when it next starts up:
Code: |
-------------------------------------------------------------------------------
6/17/2009 22:02:54 - Process(56728.5) User(my_mq_id) Program(amqzmuc0.exe)
AMQ5037: The Queue Manager task 'EXPIRER' has started.
EXPLANATION:
The Utility Task Manager, processId(0) type(56728), has started the EXPIRER
task.
ACTION:
None. |
_________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Jun 18, 2009 9:53 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9470 Location: US: west coast, almost. Otherwise, enroute.
|
What is being discussed here is the distinction between how does something work, and exactly how does something work.
Quote: |
mqjeff's: The documented behavior for expired messages is "They are not eligible to be gotten". |
Is an example of how it works. The exactly is WMQ infrastructure; and as such it is interesting, but is platform-specific, and subject to change over time. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
|