ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » What does 'expiry' in 'MQMessage' mean?

Post new topic  Reply to topic
 What does 'expiry' in 'MQMessage' mean? « View previous topic :: View next topic » 
Author Message
thomas2004
PostPosted: Thu Jan 08, 2009 5:23 am    Post subject: What does 'expiry' in 'MQMessage' mean? Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Thu Jan 08, 2009 5:32 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Jan 08, 2009 5:35 am    Post subject: Re: What does 'expiry' in 'MQMessage' mean? Reply with quote

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
View user's profile Send private message
Mr Butcher
PostPosted: Thu Jan 08, 2009 5:55 am    Post subject: Reply with quote

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
View user's profile Send private message
PeterPotkay
PostPosted: Thu Jan 08, 2009 7:14 am    Post subject: Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Thu Jan 08, 2009 8:39 am    Post subject: Reply with quote

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
View user's profile Send private message
kevinf2349
PostPosted: Thu Jan 08, 2009 10:54 am    Post subject: Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Fri Feb 20, 2009 3:10 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Fri Feb 20, 2009 3:14 am    Post subject: Reply with quote

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
View user's profile Send private message
PeterPotkay
PostPosted: Fri Feb 20, 2009 6:26 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » What does 'expiry' in 'MQMessage' mean?
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.