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 » IBM queue is persistent but loaded a non-persistent messages

Post new topic  Reply to topic
 IBM queue is persistent but loaded a non-persistent messages « View previous topic :: View next topic » 
Author Message
xcuseme123
PostPosted: Fri Dec 02, 2016 12:42 am    Post subject: IBM queue is persistent but loaded a non-persistent messages Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Fri Dec 02, 2016 2:45 am    Post subject: Reply with quote

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
View user's profile Send private message
xcuseme123
PostPosted: Fri Dec 02, 2016 2:53 am    Post subject: Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Fri Dec 02, 2016 4:13 am    Post subject: Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Fri Dec 02, 2016 4:22 am    Post subject: Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Fri Dec 02, 2016 4:58 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
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
View user's profile Send private message
Vitor
PostPosted: Fri Dec 02, 2016 5:09 am    Post subject: Reply with quote

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
View user's profile Send private message
xcuseme123
PostPosted: Fri Dec 02, 2016 6:49 am    Post subject: Reply with quote

Apprentice

Joined: 30 Jun 2013
Posts: 33

Thank you all ..
Back to top
View user's profile Send private message
tczielke
PostPosted: Fri Dec 02, 2016 11:45 am    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 939
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
View user's profile Send private message
gbaddeley
PostPosted: Sun Dec 04, 2016 4:12 pm    Post subject: Re: IBM queue is persistent but loaded a non-persistent mess Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
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
View user's profile Send private message
xcuseme123
PostPosted: Mon Dec 05, 2016 2:07 am    Post subject: Re: IBM queue is persistent but loaded a non-persistent mess Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Mon Dec 05, 2016 6:00 am    Post subject: Re: IBM queue is persistent but loaded a non-persistent mess Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
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
View user's profile Send private message
gbaddeley
PostPosted: Tue Dec 06, 2016 3:29 pm    Post subject: Re: IBM queue is persistent but loaded a non-persistent mess Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
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
View user's profile Send private message
PeterPotkay
PostPosted: Mon Dec 12, 2016 5:34 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

The NPMCLASS of the queue is probably = HIGH
_________________
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 » IBM queue is persistent but loaded a non-persistent messages
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.