Author |
Message
|
thomas2004 |
Posted: Thu Jan 08, 2009 5:23 am Post subject: What does 'expiry' in 'MQMessage' mean? |
|
|
Novice
Joined: 13 Nov 2008 Posts: 16
|
So far I understand, the 'expiry' in 'MQMessage' means the existing time of the put message in the PUT-Queue. If this message is not taken away by the MQ-manager within this time interval, this message will be threw away. But it seems not the case. I test/try as follow:
I send a message from a client to the MQ-Manager/Queue, which should send this message further to another application and wait for the response from the application and this back to the client.
I stop this application so that the message cannot be sent. And I set the expiry to 5 secondes. I can check out that the Currentdepth of the PUT-Queue is 1. After 5 seconds, I check the PUT-Queue again and find this message is still there.
Now I start the application again and the message in the PUT-Queue is disappeared. I guess the MQ-Manager try all the time to send this message to the application. As soon as the application re-started, this message is taken away and sent to the application. But I can't find any message in the Response-Queue.
Can someone tell me why? |
|
Back to top |
|
 |
zpat |
Posted: Thu Jan 08, 2009 5:32 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
It's only physically removed when the next MQGET would have selected it or when the queue manager periodically removes expired messages (which has to be enabled and I think is z/OS only). |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jan 08, 2009 5:35 am Post subject: Re: What does 'expiry' in 'MQMessage' mean? |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
thomas2004 wrote: |
Can someone tell me why? |
Because your understanding of the expiry field is flawed. It's the time the message is available to be got. Expired messages may appear in the queue just like uncommitted ones do. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Mr Butcher |
Posted: Thu Jan 08, 2009 5:55 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
in addition (and not related to expired messages):
Quote: |
I guess the MQ-Manager try all the time to send this message to the application |
MQSeries itself will not send messages to applications. MQ places messages into local queues, or sends messages to other queuemanagers, were these messages are placed into queues. From these queues, applications may pick up the messages.
Depending on your configuration MQ can provide information for an application to be started (triggering), but MQ will not push messages to applications. _________________ Regards, Butcher |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Jan 08, 2009 7:14 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
zpat wrote: |
It's only physically removed when the next MQGET would have selected it or when the queue manager periodically removes expired messages (which has to be enabled and I think is z/OS only). |
In MQ 6.0 they added this capability to Unix and Windows too. Although only on z/OS can you specify how often the Expiry Scavenger runs. On the distributed platforms you can't control how often it happens. It only happens on queues that are open. Closed queues with expired messages will just sit there. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Jan 08, 2009 8:39 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9470 Location: US: west coast, almost. Otherwise, enroute.
|
The technical definition of expiry (from memory): the total time a message exists on any queue, after which the message will not be delivered to any MQGETting application. Expired messages are discarded by the qmgr. The requesting application may ask for expiry/exception report messages.
Thus, if a message flows from a transmission queue across a network and ends up in the destination queue or DLQ, expiry is the aggregated time.
As stated in this post, currdepth gives you the total number of messages that exist in a queue; but doesn't tell you which or how many, if any, are consumable. _________________ 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 |
|
 |
kevinf2349 |
Posted: Thu Jan 08, 2009 10:54 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
bruce2359 wrote: |
As stated in this post, currdepth gives you the total number of messages that exist in a queue; but doesn't tell you which or how many, if any, are consumable. |
...and this is one of the several good reasons why currdepth should never be used to control a loop in your code! |
|
Back to top |
|
 |
zpat |
Posted: Fri Feb 20, 2009 3:10 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
PeterPotkay wrote: |
In MQ 6.0 they added this capability to Unix and Windows too. Although only on z/OS can you specify how often the Expiry Scavenger runs. On the distributed platforms you can't control how often it happens. It only happens on queues that are open. Closed queues with expired messages will just sit there. |
How do you enable it on MQ V6 on Unix or Windows? |
|
Back to top |
|
 |
Vitor |
Posted: Fri Feb 20, 2009 3:14 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zpat wrote: |
PeterPotkay wrote: |
In MQ 6.0 they added this capability to Unix and Windows too. Although only on z/OS can you specify how often the Expiry Scavenger runs. On the distributed platforms you can't control how often it happens. It only happens on queues that are open. Closed queues with expired messages will just sit there. |
How do you enable it on MQ V6 on Unix or Windows? |
You can't disable it. AFAIK you can't control it or influence it, unlike the z/OS implementation which can be set to run at internvals (simplisticly speaking) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Feb 20, 2009 6:26 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
zpat, Look at a MQ 6.0 QM's start up messages. You'll see a process being started that does this. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|