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 » WebSphere Message Broker (ACE) Support » Changing the Default Priority of a Message

Post new topic  Reply to topic Goto page 1, 2  Next
 Changing the Default Priority of a Message « View previous topic :: View next topic » 
Author Message
Glass
PostPosted: Thu Nov 16, 2006 1:04 pm    Post subject: Changing the Default Priority of a Message Reply with quote

Acolyte

Joined: 02 Mar 2006
Posts: 56

Hi,

I am using MQ Integrator version 2.1 and I wanted to change the message priority depending on a certain condition. I tried adding the code in ESQL as:
SET OutputRoot.MQMD.Priority=2;

In mqsi trace I see that it gets set to 2 but when the message appears in the queue, the value is '0'. In the queue properties, I have the "Message Delivery Sequence" set as "Priority".

I also tried setting the "Default Priority" of the queue to 2 and still all the messages passing through it has a priotity of 0.

What am I missing here or what is the best way to set the message priority?

Thanks!
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Thu Nov 16, 2006 1:17 pm    Post subject: Re: Changing the Default Priority of a Message Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Glass,

Instead of this
Glass wrote:
SET OutputRoot.MQMD.Priority=2;
try this
Code:
SET OutputRoot.Properties.Priority=2

Should work...

Regards.
Back to top
View user's profile Send private message Send e-mail
Glass
PostPosted: Thu Nov 16, 2006 1:31 pm    Post subject: Reply with quote

Acolyte

Joined: 02 Mar 2006
Posts: 56

Elvis,

This did not change anything. Is there a way to change the priority of all messages passing throgh a particular queue by changing the properties of that queue directly without making ESQL changes?

Thanks
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Nov 17, 2006 12:07 am    Post subject: Reply with quote

Grand High Poobah

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

Hi Glass,

I'm using MQSI 2.1 (no-one say anything - the upgrade being planned!) and I have flows at the moment using
Code:
OutputRoot.MQMD.Priority= ...


and this is working fine.

Obvious question time - how are you checking the priority of the outbound message? Is there a QALIAS in use? Can anything else be interfering with the setting.

Certainly if you don't code anything, changing the priority of the queue should have an effect...

...odd.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Glass
PostPosted: Fri Nov 17, 2006 9:56 am    Post subject: Reply with quote

Acolyte

Joined: 02 Mar 2006
Posts: 56

I found out that in MQ Series 5.3, which we have, you cannot change the priority directly in the queue. Well, you can but it will have no effect.

When I change the code in ESQL I am checking the priority in the message in the queue by stopping the sender channel. I don't hav any QALIAS.

Thanks for your input. I will keep trying.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Nov 20, 2006 12:59 am    Post subject: Reply with quote

Grand High Poobah

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

Glass wrote:
I found out that in MQ Series 5.3, which we have, you cannot change the priority directly in the queue. Well, you can but it will have no effect.


In all versions of MQ, you can only change the default priority in the queue attributes. Whatever puts the messages can still set it to a preferred value (subject to the limits obviously)

Glass wrote:
When I change the code in ESQL I am checking the priority in the message in the queue by stopping the sender channel. I don't hav any QALIAS.


Do you mean that, for development purposes only, you're stopping the sender channel to check the priority of the outbound message in the XMITQ? Because it's a bad thing to stop a sender channel for any other reason.

I'd also be inclined to check the priority of the message once it arrives at it's destination. Not only is it easier (!) it's the answer the recieving app will be required to use and therefore a better representation.

You could of course use a QALIAS (with a different default priority) to set the priority of your messages, but that's a very big sladehammer to crack a very small nut.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Nov 20, 2006 1:09 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

[quote="Vitor]You could of course use a QALIAS (with a different default priority) to set the priority of your messages, but that's a very big sladehammer to crack a very small nut.[/quote]

That sounds like something Noddy Holder would use...
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Nov 20, 2006 1:21 am    Post subject: Reply with quote

Grand High Poobah

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

zpat wrote:
[quote="Vitor]You could of course use a QALIAS (with a different default priority) to set the priority of your messages, but that's a very big sladehammer to crack a very small nut.


That sounds like something Noddy Holder would use... [/quote]

Possibly, but you'd feel the noise....

Time to climb down off the platforms and get more coffee. Much, much more coffee.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
nathanw
PostPosted: Mon Nov 20, 2006 2:09 am    Post subject: Reply with quote

Knight

Joined: 14 Jul 2004
Posts: 550

Why not set the priority in the message when it is originally written to MQ and then pass the MQMD parameters across in Broker

In essence if you cannot change the priority in Broker then you have a problem in your code or a setting somewhere after the esql to regenerate your header information and ignore previous settings.
_________________
Who is General Failure and why is he reading my hard drive?

Artificial Intelligence stands no chance against Natural Stupidity.

Only the User Trace Speaks The Truth
Back to top
View user's profile Send private message MSN Messenger
Vitor
PostPosted: Mon Nov 20, 2006 2:15 am    Post subject: Re: Changing the Default Priority of a Message Reply with quote

Grand High Poobah

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

nathanw wrote:
Why not set the priority in the message when it is originally written to MQ and then pass the MQMD parameters across in Broker


Glass wrote:
I wanted to change the message priority depending on a certain condition.

_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
nathanw
PostPosted: Mon Nov 20, 2006 2:18 am    Post subject: Re: Changing the Default Priority of a Message Reply with quote

Knight

Joined: 14 Jul 2004
Posts: 550

Vitor wrote:
nathanw wrote:
Why not set the priority in the message when it is originally written to MQ and then pass the MQMD parameters across in Broker


Glass wrote:
I wanted to change the message priority depending on a certain condition.


I agree about the condition but wouldnt the condition apply at source? In other words depending on the condition write the original message with teh correct priority
_________________
Who is General Failure and why is he reading my hard drive?

Artificial Intelligence stands no chance against Natural Stupidity.

Only the User Trace Speaks The Truth
Back to top
View user's profile Send private message MSN Messenger
Vitor
PostPosted: Mon Nov 20, 2006 2:29 am    Post subject: Reply with quote

Grand High Poobah

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

Not necessarially; consider the example of an ordering system. Orders are received from a variety of sources, perhaps some from 3rd parties, some from direct sales (e.g. web). For business reasons these need to be prioritised by sale type and/or channel with a database used to hold scoring values. Rather than having 1-n connections & applications to the database, especially from areas vunerable to change & attack, you might well concentrate the functionality in the message broker. This also allows easier monitoring and scaling, and simplifies changes to database schema by having only 1 application referencing it!

Not compelling reasons to be sure and there are equally valid examples where you'd set priority on send. As I intimated further up the thread, we set priority in the broker like we set destination.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
nathanw
PostPosted: Mon Nov 20, 2006 2:39 am    Post subject: Reply with quote

Knight

Joined: 14 Jul 2004
Posts: 550

Vitor yes you are right and like you normally I set priority etc in broker based on conditions therein, however, in this case it seems like he cannot.

I have to admit that stopping and starting a sender channel to check settings seems very harsh tho.
_________________
Who is General Failure and why is he reading my hard drive?

Artificial Intelligence stands no chance against Natural Stupidity.

Only the User Trace Speaks The Truth
Back to top
View user's profile Send private message MSN Messenger
Vitor
PostPosted: Mon Nov 20, 2006 2:43 am    Post subject: Reply with quote

Grand High Poobah

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

nathanw wrote:
in this case it seems like he cannot.


It would be a shame to incur all the overhead for setting priority at source (via QALIAS etc) when the functionality exists with broker to do it as he wishes; we know it exists because both of us are using it!

Extending the same arguement ad absurdium would have us using HTTP if we can't get channels to start! Besides, fixing problems is fun....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
nathanw
PostPosted: Mon Nov 20, 2006 3:06 am    Post subject: Reply with quote

Knight

Joined: 14 Jul 2004
Posts: 550

I agree

As for fixing the problem,a s far as I can see it is either his code or there is a setting after the compute node to create new parameters etc. thus erasing his priority
_________________
Who is General Failure and why is he reading my hard drive?

Artificial Intelligence stands no chance against Natural Stupidity.

Only the User Trace Speaks The Truth
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Changing the Default Priority of a Message
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.