Author |
Message
|
solomon_13000 |
Posted: Thu Oct 02, 2008 7:17 am Post subject: DEFPSIST |
|
|
Master
Joined: 13 Jun 2008 Posts: 284
|
I notice that the value used for the attribute DEFPSIST vary depending on the type of message as in persistant or non persistant messages. To improve message flow performance between queue manager the DEFPSIST attribute is set to the value DEFPSIST(NO). When it comes to a persistant message on the other hand the DEFPSIST attribute is set to value DEFPSIST(YES). Is the attribute DEFPSIST being used to indicate the message type as in persistant or non persistant?. |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Oct 02, 2008 7:21 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
From the InfoCenter
Quote: |
DEFPSIST
Specifies the message persistence to be used when applications specify the MQPER_PERSISTENCE_AS_Q_DEF option.
NO
Messages on this queue are lost across a restart of the queue manager. This is the default supplied with WebSphere MQ, but your installation might have changed it.
YES
Messages on this queue survive a restart of the queue manager. |
Of course, an application can specify whatever (persistent, non-persistent) it wants when it actually puts the message. |
|
Back to top |
|
 |
solomon_13000 |
Posted: Thu Oct 02, 2008 7:33 am Post subject: |
|
|
Master
Joined: 13 Jun 2008 Posts: 284
|
But then if I specify the attribute NPMCLASS to the value HIGH, then the non persistant message can still survive a queue manager restart. |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Oct 02, 2008 7:40 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
NPMCLASS was added to allow for some JMS capabilities. The DEFPSIST parameter is giving you the "general behavior" that you might (or might not) try to override with NPMCLASS.
If a message has to stick around, I wouldn't mark it non-persistent and then hope that the NPMCLASS is set correctly. |
|
Back to top |
|
 |
solomon_13000 |
Posted: Thu Oct 02, 2008 7:43 am Post subject: |
|
|
Master
Joined: 13 Jun 2008 Posts: 284
|
But the NPMCLASS attribute can only be used with the local queue apart from the model queue. |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Oct 02, 2008 7:46 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
solomon_13000 wrote: |
But the NPMCLASS attribute can only be used with the local queue apart from the model queue. |
Is there a question here? |
|
Back to top |
|
 |
solomon_13000 |
Posted: Thu Oct 02, 2008 7:48 am Post subject: |
|
|
Master
Joined: 13 Jun 2008 Posts: 284
|
well it's just to highlight the use of NPMCLASS. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Oct 02, 2008 8:48 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
For clarity:
Default persistence setting at the queue is NOT a default. It is NOT a default. It is NOT a default.
The application must specify the persistence of the message by chosing one of these:
- this message is persistent
- this message is non-persistent
- take on the persistence attribute setting of the queue. possible queue attribute settings are DEFPSIST(NO) and DEFPSIST(YES).
Failure to pick one of these will cause the put to fail.
Did I mention that DEFPSIST is not a default? It should have been called something like PSISTIFTHEPROGRAMMERPICSKTHETHIRDOPTION; but clearly it's too long for an attribute. _________________ 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 |
|
 |
mqjeff |
Posted: Thu Oct 02, 2008 8:51 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
But the third option IS the default option... |
|
Back to top |
|
 |
solomon_13000 |
Posted: Thu Oct 02, 2008 8:54 am Post subject: |
|
|
Master
Joined: 13 Jun 2008 Posts: 284
|
Using the DEFPSIST attribute with the value YES, would actually mean that a non persistant message put on a persistant queue will be converted into a persistant message. Therefore I wont have to worry about the use of NPMCLASS attribute unless if the DEFPSIST attribute value is set to NO. Is it correct?. |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Oct 02, 2008 9:11 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
solomon_13000 wrote: |
Using the DEFPSIST attribute with the value YES, would actually mean that a non persistant message put on a persistant queue will be converted into a persistant message. Therefore I wont have to worry about the use of NPMCLASS attribute unless if the DEFPSIST attribute value is set to NO. Is it correct?. |
No, if you put a non-persistent message onto a DEFPSIST(YES) queue then the message is non-persistent.
Also, there is no such thing as a persistent or non-persistent queue. Messages are either persistent or non-persistent and you can have both types on the same queue. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Oct 02, 2008 9:53 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
But the third option IS the default option... |
As distributed from the WMQ factory, the MQMD persistence attribute is set to 'take the attribute of the queue.' This is an initial-value. To the casual observer, it might appear to be a default.
Best practice demands that programmers set every field that needs setting to whatever value required to meet the business requirement.
I dislike this particular as-shipped MQMD attribute value because I want my messages to be persistent because I (the programmer) set the MQMD attribute, not because someone with admin authority changes the queue attribute.
I suppose we could all digress into a discussion of the difference between defaults and initial values... _________________ 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 |
|
 |
|