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 » Expiry doubt - the value is decremented only after commit ?

Post new topic  Reply to topic Goto page Previous  1, 2
 Expiry doubt - the value is decremented only after commit ? « View previous topic :: View next topic » 
Author Message
gbaddeley
PostPosted: Mon May 06, 2013 3:37 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

http://pic.dhe.ibm.com/infocenter/wmqv7/v7r5/topic/com.ibm.mq.doc/fr13130_.htm

Expiry seems to be decremented by MQ when a message is "on a queue", which to me means only committed messages. MCAs and applications can also decrement it. Expiry is an approximate value, it is not hard science.

I suggest that if you use Expiry, set it to at least double the longest message processing time that would be expected in normal app operations. It is most suited to non persistent messages where the apps do not care if the message is eventually consumed or not. Expiry of less than 30 - 60 seconds is hard to justify.

Critical messages (eg. DB updates, financial transactions, orders) should be persistent and have unlimited expiry (the default).
_________________
Glenn
Back to top
View user's profile Send private message
ealcantara
PostPosted: Tue May 07, 2013 6:35 am    Post subject: Reply with quote

Novice

Joined: 16 May 2005
Posts: 13

Hi,

I wrote a program, did a test and the the expiry BEGINS at PUT TIME.

Thanks a lot to all.

Best regards,

Eros Alcantara.
Back to top
View user's profile Send private message
exerk
PostPosted: Tue May 07, 2013 6:41 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

ealcantara wrote:
...I wrote a program, did a test and the the expiry BEGINS at PUT TIME...

Just for clarity (I'm a bear of very little brain - as Vitor can confirm) - if you PUT a message with expiry set to 30 seconds, and COMMIT the message 31 seconds later, it will already have expired?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
ealcantara
PostPosted: Tue May 07, 2013 6:49 am    Post subject: Reply with quote

Novice

Joined: 16 May 2005
Posts: 13

Yes !

I ran a batch job exactly that you said and when the job finished, the message was not available.

Regards,

Eros.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue May 07, 2013 7:24 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ealcantara wrote:
I wrote a program, did a test and the the expiry BEGINS at PUT TIME.




ealcantara wrote:
Thanks a lot to all.


Thank you for posting your results.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Tue May 07, 2013 10:08 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

I wonder of an Expiry Report message would be immediately generated?

I submitted the following feed back on the InfoCenter page for Expiry
http://pic.dhe.ibm.com/infocenter/wmqv7/v7r5/topic/com.ibm.mq.doc/fr13130_.htm

Quote:
Can you please add information to this article on the MQMD Expiry field to indicate what the documented behavior is when an app does an MQPUT under syncpoint with an Expiry of say 10 seconds, but it takes > 10 seconds before the app issues the MQCMIT call? When the MQCMIT is issued, does the message land on the queue with 10 seconds of Expiry, or is the message immediatly eligible for being discarded because the Expiry count was decremented while the messages was waiting to be committed or backed out?

Info on whether and when an Expiry Report would be generated in this scenario would also be helpful.

_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue May 07, 2013 10:18 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

PeterPotkay wrote:
I wonder of an Expiry Report message would be immediately generated?


Good question

PeterPotkay wrote:
I submitted the following feed back on the InfoCenter page for Expiry
http://pic.dhe.ibm.com/infocenter/wmqv7/v7r5/topic/com.ibm.mq.doc/fr13130_.htm


I submitted mine yesterday. Included a link to this thread and asked for examples because it's really not that clearly described.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jan 17, 2014 5:35 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Update- I received this from IBM this morning:

Quote:

Thank you for your comment. An additional paragraph has been added to the
"Expiry (MQLONG)" topic to cover this point. This change will be seen in
the next refresh of the WebSphere MQ v7.0.1, v7.1 and v7.5 Information
Centers, scheduled for early February 2014.

_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Fri Jan 17, 2014 5:43 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

At the risk of appearing like I am plugging my own code I thought I would point out that there are one or two MQI exercisers out there. So, rather than go through the hassle of writing a new test program why not just try out the sequence of calls you require in an exerciser. MO71 has an MQI exerciser which allows you to try pretty much any MQI option and MQI sequence using the majority of MQI verbs.

Cheers,
Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
PeterPotkay
PostPosted: Fri Jan 17, 2014 6:11 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Vitor wrote:
Update- I received this from IBM this morning:

Quote:

Thank you for your comment. An additional paragraph has been added to the
"Expiry (MQLONG)" topic to cover this point. This change will be seen in
the next refresh of the WebSphere MQ v7.0.1, v7.1 and v7.5 Information
Centers, scheduled for early February 2014.

I got the same update from Colin this morning.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri Jan 17, 2014 6:12 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

PaulClarke wrote:
At the risk of appearing like I am plugging my own code I thought I would point out that there are one or two MQI exercisers out there. So, rather than go through the hassle of writing a new test program why not just try out the sequence of calls you require in an exerciser. MO71 has an MQI exerciser which allows you to try pretty much any MQI option and MQI sequence using the majority of MQI verbs.

Cheers,
Paul.

I have used this many times. Its a lot easier and faster (for me) than hacking up amqsputc with new code and recompiling.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Jan 17, 2014 7:08 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

From http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=%2Fcom.ibm.mq.csqzak.doc%2Ffr13130_.htm .
No distinction is made between messages not yet committed, just as with current depth.

Quote:
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. For example, a nonbrowse MQGET call with the MatchOptions field in MQGMO set to MQMO_NONE reading from a FIFO ordered queue discards all the expired messages up to the first unexpired message. With a priority ordered queue, the same call will discard expired messages of higher priority and messages of an equal priority that arrived on the queue before the first unexpired message.

A message that has expired is never returned to an application (either by a browse or a non-browse MQGET call), so the value in the Expiry field of the message descriptor after a successful MQGET call is either greater than zero, or the special value MQEI_UNLIMITED.

If a message is put on a remote queue, the message might expire (and be discarded) while it is on an intermediate transmission queue, before the message reaches the destination queue.

A report is generated when an expired message is discarded, if the message specified one of the MQRO_EXPIRATION_* report options. If none of these options is specified, no such report is generated; the message is assumed to be no longer relevant after this time period (perhaps because a later message has superseded it).

_________________
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
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » General IBM MQ Support » Expiry doubt - the value is decremented only after commit ?
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.