Author |
Message
|
xcuseme123 |
Posted: Fri Dec 02, 2016 12:42 am Post subject: IBM queue is persistent but loaded a non-persistent messages |
|
|
Apprentice
Joined: 30 Jun 2013 Posts: 33
|
A queue is created as a persistent , which has both persistent and non-persistent messages. I see that non-persistent messages were stored in the queue 10 years ago are still exist even after QM restart. Can these non-persistent messages survive if there QM fail-over or crash ?
Thanks.. |
|
Back to top |
|
 |
exerk |
Posted: Fri Dec 02, 2016 2:45 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
If those messages haven't been processed in ten years are they still relevant? Is someone going to complain if they disappear? If you're that worried, read them off the queue into an alternative 'storage' medium... _________________ 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 |
|
 |
xcuseme123 |
Posted: Fri Dec 02, 2016 2:53 am Post subject: |
|
|
Apprentice
Joined: 30 Jun 2013 Posts: 33
|
these messages have some configuration used by an application so con not lose messages. Since its an existing application, not ready make any design changes even though its not a good design .
I can make these non-persistent messages as persistent . But I was thinking, can a persistent queue lose non-persistent messages ? |
|
Back to top |
|
 |
exerk |
Posted: Fri Dec 02, 2016 4:13 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
xcuseme123 wrote: |
..I can make these non-persistent messages as persistent . But I was thinking, can a persistent queue lose non-persistent messages ? |
Queues are NOT persistent, messages ARE if made so. If the messages are that important for the application, the application should have made them persistent, or better still have the information within those messages in an initialisation file. Non-persistent messages can survive a queue manager controlled shut-down/restart (dependent on NPMCLASS setting) but not an uncontrolled (crash) failure. _________________ 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 |
|
 |
smdavies99 |
Posted: Fri Dec 02, 2016 4:22 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
to expand a little on what my esteemed colleagie has said,
The persistency setting on the queue defines what the DEFAULT persistency of message PUT to that queue are. i.e. if you don't set it in the write operation, this is what you get.
This can (and in many respects should) be overwritten by the Application that PUTS the message to the queue. Then that application will run correctly even if the Queue Persistency is defined wrongly (for the application needs). _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Dec 02, 2016 4:58 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
... and with a bit more detail:
Persistence of a message is set in the MQMD just before the message payload (MQMD and application data) is MQPUT to the queue.
The app developer has three (3) possible choices to set persistence attribute of a message, namely:
1) MQPER_PERSISTENT makes this message persistent
2) MQPER_NOT_PERSISTENT makes this message non-persistent
3) MQPER_PERSISTENCE_AS_Q_DEF
As delivered from IBM, the initial MQMD value (not really a default) is option 3), which tells the qmgr to set the persistence for this message to the persistence value specified at the queue.
If the developer chooses 1) or 2), the qmgr ignores the persistence attribute value set at the queue.
There are many "initial values" in MQ. These are well-documented in the MQ Application Developers Guide & Ref. manuals, and IBM KC. _________________ 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.
Last edited by bruce2359 on Fri Dec 02, 2016 5:18 am; edited 1 time in total |
|
Back to top |
|
 |
Vitor |
Posted: Fri Dec 02, 2016 5:09 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
And to chime in....
A persistent message (and I echo the comments of my associates regarding persistence being a message property) is guaranteed to survive a queue manager restart, even following a crash. A non-persistent message is not, but may well do if nothing bad happens. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
xcuseme123 |
Posted: Fri Dec 02, 2016 6:49 am Post subject: |
|
|
Apprentice
Joined: 30 Jun 2013 Posts: 33
|
Thank you all .. |
|
Back to top |
|
 |
tczielke |
Posted: Fri Dec 02, 2016 11:45 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
bruce2359 wrote: |
As delivered from IBM, the initial MQMD value (not really a default) is option 3), which tells the qmgr to set the persistence for this message to the persistence value specified at the queue. |
Developers should heed the advice of Neil Peart, in regards to MQ Persistence.
"If you choose not to decide, you still have made a choice!"
 _________________ Working with MQ since 2010. |
|
Back to top |
|
 |
gbaddeley |
Posted: Sun Dec 04, 2016 4:12 pm Post subject: Re: IBM queue is persistent but loaded a non-persistent mess |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
xcuseme123 wrote: |
.. I see that non-persistent messages were stored in the queue 10 years ago are still exist even after QM restart... |
Are you absolutely sure they are Persistent? How did you check? _________________ Glenn |
|
Back to top |
|
 |
xcuseme123 |
Posted: Mon Dec 05, 2016 2:07 am Post subject: Re: IBM queue is persistent but loaded a non-persistent mess |
|
|
Apprentice
Joined: 30 Jun 2013 Posts: 33
|
gbaddeley wrote: |
xcuseme123 wrote: |
.. I see that non-persistent messages were stored in the queue 10 years ago are still exist even after QM restart... |
Are you absolutely sure they are Persistent? How did you check? |
I had browsed those messages and checked the MQ header properties.. |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Dec 05, 2016 6:00 am Post subject: Re: IBM queue is persistent but loaded a non-persistent mess |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
xcuseme123 wrote: |
gbaddeley wrote: |
xcuseme123 wrote: |
.. I see that non-persistent messages were stored in the queue 10 years ago are still exist even after QM restart... |
Are you absolutely sure they are Persistent? How did you check? |
I had browsed those messages and checked the MQ header properties.. |
Do you mean that you examined the MQMD? What was the persistence value of the messages? _________________ 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 |
|
 |
gbaddeley |
Posted: Tue Dec 06, 2016 3:29 pm Post subject: Re: IBM queue is persistent but loaded a non-persistent mess |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
xcuseme123 wrote: |
gbaddeley wrote: |
xcuseme123 wrote: |
.. I see that non-persistent messages were stored in the queue 10 years ago are still exist even after QM restart... |
Are you absolutely sure they are Persistent? How did you check? |
I had browsed those messages and checked the MQ header properties.. |
Can you paste the output of amqsbcg, containing the Message descriptor of message number 1? The Persistence, PutDate and PutTime values are of most interest. _________________ Glenn |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Dec 12, 2016 5:34 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
The NPMCLASS of the queue is probably = HIGH _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|