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 » Alias Q and Local Q - one of them Persistent

Post new topic  Reply to topic Goto page 1, 2  Next
 Alias Q and Local Q - one of them Persistent « View previous topic :: View next topic » 
Author Message
sebastia
PostPosted: Wed Feb 14, 2007 4:51 am    Post subject: Alias Q and Local Q - one of them Persistent Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

We are having a discussion here, and need to clarify one item.

If we have an alias queue QA1 that has DEFPSIST=YES
and points to QL1 using TARGQ("QL1"),
and that local queue QL1 that has DEFPSIST=NO ...

will the messages survive the queue manager Restart ?

And the inverse situation ?
( QA1 has "DEFPSIST=NO" and QL1 has "DEFPSIST=YES" )

Thanks !
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Wed Feb 14, 2007 5:05 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Non-persistant messages do not survive a queue manager restart unless the queue has NPMCLASS set to allow for it.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Feb 14, 2007 5:28 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Messages are persistent, NOT queues.

The "persistence from queue default" value will be taken from the queue that is referenced on the MQPUT (the alias queue value if that is the one opened will be used rather than the base queue).
Back to top
View user's profile Send private message
jsware
PostPosted: Wed Feb 14, 2007 5:34 am    Post subject: Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

As jeoff mentions, its messages that have persistence, not queues.

The DEFPSIST option indicates what the persistence will be for messages that are put with the MQPER_PERSISTENCE_AS_Q_DEF.

Thus if you use MQPER_PERSISTENT or MQPER_NOT_PERSISTENT on your MQPUT, the messages will be/not be persistent regardless of the QALIAS/QLOCAL's DEFPSIST setting.

If your MQPUT uses MQPER_PERSISTENCE_AS_Q_DEF, then if you MQOPEN the QALIAS, the message gets the persistent of the QALIAS's DEFPSIST option regardless of the QLOCAL's setting. If you MQOPEN the QLOCAL directly, your message gets the persistence from the QLOCAL's DEFPSIST option regardless of the QALIAS's setting.
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
sebastia
PostPosted: Wed Feb 14, 2007 5:52 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

thanks to all pointing to the truth that Messages are persistent, not queues
we knew that - thanks anyway.

and yes, I fogot to specify we are talking about a MQPUT()
with "MQPER_PERSISTENCE_AS_Q_DEF", so it is taken from the queue.

I'd say this is the usual envir I find : the application programmers dont
want to know about the consequences of those bits, so we rely on the
definition of queues, here.

Well - then, as Scott says, the Persistence is taken from the queue
we do MQOPEN() to. Or, in fact, it is the queue we do a MQPUT() into ...

Fantastic. That was a great answer. Thanks to all.

Is it too demanding
to ask for a pointer to any documentation explaining this point ?

( I always ask for such strange things, I never get an answer ... )

()
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Wed Feb 14, 2007 6:02 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Again, though, if the actual qlocal has the right value for NPMCLASS, then non-persistant messages will survive restart.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Wed Feb 14, 2007 7:07 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

jefflowrey wrote:
Again, though, if the actual qlocal has the right value for NPMCLASS, then non-persistant messages will survive restart.


But only for "normal" restarts . If the QMgr crashes or the processes have been killed, the message will be lost.


I Think, the question of sebastia should be:

Quote:
When an application uses "MQPER_PERSISTENCE_AS_Q_DEF", what will be the persistence of the messages?


This question could be answered as follows:

Scenario 1: QA1 has DEFPSIST=YES, QL1 has DEFPSIST=NO:

- If the application puts (opens) to QA1 -> message is persistent

- If the application puts (opens) to QL1 -> message is non-persistent


Scenario 2: QA1 has DEFPSIST=NO, QL1 has DEFPSIST=YES:

- If the application puts (opens) to QA1 -> message is non-persistent

- If the application puts (opens) to QL1 -> message is persistent


If messages survive a "normal" QMgr restart or not is defined by the persistence of the message and (for non-persistent messages only) by the value of "NPMCLASS".
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
sebastia
PostPosted: Wed Feb 14, 2007 8:03 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

Jeff : the "normal" qm restarts are not to be considered,
as it is with the "unusual" restarts when you will loose the messages.
So, lets forget about NPMCLASS.

Hubert - thanks for your clear "resume".

And thanks to you all for making my living easier.
S.
Back to top
View user's profile Send private message Visit poster's website
tleichen
PostPosted: Wed Feb 14, 2007 8:20 am    Post subject: Re: Alias Q and Local Q - one of them Persistent Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

sebastia wrote:
...we have an alias queue QA1 that has DEFPSIST=YES
and points to QL1 using TARGQ("QL1"),
and that local queue QL1 that has DEFPSIST=NO ...
My first question would be.... WHY? If you're going to control message persistence with the queue attributes, why would you make an alias queue with an inconsistent attribute from the corresponding local queue?
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 14, 2007 8:36 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Because you do want to control the attributes at the queue level, and want to provide different attributes for different applications to send messages to the same receiving application.

App1->QA1 (persistant) -> QL1 -> receiver1
App2->QA2(NP) -> QL1 -> receiver1
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Thu Feb 15, 2007 12:31 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

jefflowrey wrote:
Because you do want to control the attributes at the queue level, and want to provide different attributes for different applications to send messages to the same receiving application.

App1->QA1 (persistant) -> QL1 -> receiver1
App2->QA2(NP) -> QL1 -> receiver1


Another solution could be

App1->QA1 with GET(ENABLED), PUT(DISABLED) -> QL1
App2->QA2 with GET(DISABLED), PUT(ENABLED) -> QL1

But I would suggest, to define the persistency NOT via q attributes, but the application should use "MQPER_PERSISTENT" or "MQPER_NOT_PERSISTENT" instead.
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
sebastia
PostPosted: Thu Feb 15, 2007 2:26 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

This time Jeff has got EXACTLY our environment !!!

a) Applications developers do NOT want to know about Persistency.
b) one application messages ARE important, so they have to survive
c) another application messages are NOT (so) important, so can be allowed to be lost in extreme cases
d) both [b] and [c] have to use the same LOCAL queue

... so, the right place to IMPLEMENT or SPECIFY our requirements
is in the ALIAS parameters.

Thanks to all of you to help us see it more clear !

S.
Back to top
View user's profile Send private message Visit poster's website
HubertKleinmanns
PostPosted: Thu Feb 15, 2007 2:36 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

sebastia wrote:
This time Jeff has got EXACTLY our environment !!!

a) Applications developers do NOT want to know about Persistency.
b) one application messages ARE important, so they have to survive
c) another application messages are NOT (so) important, so can be allowed to be lost in extreme cases
d) both [ b ] and [ c ] have to use the same LOCAL queue

... so, the right place to IMPLEMENT or SPECIFY our requirements
is in the ALIAS parameters.

Thanks to all of you to help us see it more clear !

S.


Sorry, but this is stupid!

Only the application is available, to decide, whether a message is important or not, because it depends on the application's context!

As MQ administrator you cannot know, which messages are put to the Queue!

And you definitely cannot guarantee the persistence of a message!
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
exerk
PostPosted: Thu Feb 15, 2007 4:02 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

sebastia wrote:
This time Jeff has got EXACTLY our environment !!!

a) Applications developers do NOT want to know about Persistency.
b) one application messages ARE important, so they have to survive
c) another application messages are NOT (so) important, so can be allowed to be lost in extreme cases
d) both [b] and [c] have to use the same LOCAL queue

... so, the right place to IMPLEMENT or SPECIFY our requirements
is in the ALIAS parameters.

Thanks to all of you to help us see it more clear !

S.


I agree with HubertKleinmanns - consider the implications of an administrator changing the QA attribute to NON-PERSISTENT, suddenly important messages may go missing.

If the application considers the message to be so important it cannot be lost - GET THE APPLICATION TO SET PERSISTENCE!
_________________
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
kevinf2349
PostPosted: Thu Feb 15, 2007 6:00 am    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

Quote:
a) Applications developers do NOT want to know about Persistency.


What do you mean? Do you mean that that they don't want to know about what it is and why in is vital to the busines to get it correct. Or do you mean they don't want to have to consider the persistency of the messages going from one environment to the other (development to production)?

Either way IMHO Persistency of the business data is a vital consideration when designing business applications you simply can't ignore it.

Someone once suggested to me that 'persistence was always a given in a production environment'....needless to say they got shot down on that one.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General IBM MQ Support » Alias Q and Local Q - one of them Persistent
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.