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 » message priority not working

Post new topic  Reply to topic
 message priority not working « View previous topic :: View next topic » 
Author Message
santosh.veerlapati
PostPosted: Tue Jun 02, 2009 4:40 am    Post subject: message priority not working Reply with quote

Voyager

Joined: 19 Jun 2008
Posts: 87

Hi

I have a queue that has properties depicted below

general: default priority :0
Extended:Message Delivery Sequence:priority

and i m communicating to this queue and queue manager through Java program using MQ API

and i m setting message priority like below

JMSTextMessage message = (JMSTextMessage) session.createTextMessage(ss);
message.setJMSPriority(;

but the priority based storing or retriving is not working..
when i retrive the message its
jms priority is telling 4 for all messages that i have sent eventhough i sent with different jmspriorities..

can anybody help me on this

thanks in advance
santosh kumar veerlapati
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jun 02, 2009 4:47 am    Post subject: Re: message priority not working Reply with quote

Grand High Poobah

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

santosh.veerlapati wrote:
jms priority is telling 4 for all messages that i have sent eventhough i sent with different jmspriorities..


Are you saying that the retrieved message has a priority of 4 even if it was sent with a priority of 8, or that the messages are being presented to your application in the wrong sequence?

Or are you just setting the value in the message rather than the send?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
santosh.veerlapati
PostPosted: Tue Jun 02, 2009 4:50 am    Post subject: Reply with quote

Voyager

Joined: 19 Jun 2008
Posts: 87

yes u r correct

the retrieved message has a priority of 4 even if it was sent with a priority of 8or 6 or 2 or anything
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jun 02, 2009 4:52 am    Post subject: Reply with quote

Grand High Poobah

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

But were they delivered in the correct sequence?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
santosh.veerlapati
PostPosted: Tue Jun 02, 2009 5:32 am    Post subject: Reply with quote

Voyager

Joined: 19 Jun 2008
Posts: 87

the messages are sitting on the queue in which the order i sent , not depending upon the priority
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jun 02, 2009 5:34 am    Post subject: Reply with quote

Grand High Poobah

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

santosh.veerlapati wrote:
the messages are sitting on the queue in which the order i sent , not depending upon the priority


Not the question I asked.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
santosh.veerlapati
PostPosted: Tue Jun 02, 2009 5:39 am    Post subject: Reply with quote

Voyager

Joined: 19 Jun 2008
Posts: 87

the messages are delivered in the correct sequence(the order in which i sent )
Back to top
View user's profile Send private message
sumit
PostPosted: Tue Jun 02, 2009 7:32 am    Post subject: Reply with quote

Partisan

Joined: 19 Jan 2006
Posts: 398

santosh.veerlapati wrote:
the messages are delivered in the correct sequence(the order in which i sent )


When you explain 'correct sequence', then what's the use of setting priority? Priority means messages should be delivered in order of their priority but not in order they were placed into the queue.

Can you please explain what's the exact problem you are facing? More the description, better the responses.
_________________
Regards
Sumit
Back to top
View user's profile Send private message Yahoo Messenger
fjb_saper
PostPosted: Tue Jun 02, 2009 3:38 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Verify the default settings of the JMS / JNDI setup.
Make sure it says APP Defined and not default or MQ defined.
You can also set the priority in the JNDI and define multiple JNDI name for the same base queue name. The difference would be the priority setting.
You can then use those multiple JNDI name to retrieve the Queue object and you will have 1 Queue object per priority....

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
santosh.veerlapati
PostPosted: Tue Jun 02, 2009 9:20 pm    Post subject: Reply with quote

Voyager

Joined: 19 Jun 2008
Posts: 87

exactly

When you explain 'correct sequence', then what's the use of setting priority? Priority means messages should be delivered in order of their priority but not in order they were placed into the queue.


thats what my problem is ...
Back to top
View user's profile Send private message
santosh.veerlapati
PostPosted: Wed Jun 03, 2009 1:49 am    Post subject: Reply with quote

Voyager

Joined: 19 Jun 2008
Posts: 87

yes

If i m using

MQQueue queue = (MQQueue) session.createQueue("queue:///HubQueue");
queue.setPriority(5 );

the message went to the queue is containig the same priority (i.e 5) i have mentioned.

But when i use

MQQueue queue = (MQQueue) session.createQueue("queue:///HubQueue");
queue.setPriority(JMSC.MQJMS_PRI_APP );


and
JMSTextMessage message = (JMSTextMessage) session.createTextMessage(ss);

message.setJMSPriority(5);

the message send is not having priority 5, it contains the default priority of 4

why in this way it is not working

can anybody help me out in this

thanks in advance
santosh kumar veerlapati
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jun 03, 2009 7:49 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

I believe you would have to set the priority on the producer / sender.
Generally the destination setting will override all. Read up in the manuals to find by what exact order of priority you can set this value. Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
santosh.veerlapati
PostPosted: Wed Jun 03, 2009 10:20 pm    Post subject: Reply with quote

Voyager

Joined: 19 Jun 2008
Posts: 87

i want to set the default priority for the desitnation(MQueue) and producer(MQSender) and

priority should work on the Message i have set like below

JMSTextMessage message = (JMSTextMessage) session.createTextMessage(ss);

message.setJMSPriority(1);

whichever i m giving priority for the message using message.setJmsPriority()

that should be the final priority for the message i m sending

for that what i need to do
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jun 04, 2009 8:32 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

santosh.veerlapati wrote:
i want to set the default priority for the desitnation(MQueue) and producer(MQSender) and

priority should work on the Message i have set like below

JMSTextMessage message = (JMSTextMessage) session.createTextMessage(ss);

message.setJMSPriority(1);

whichever i m giving priority for the message using message.setJmsPriority()

that should be the final priority for the message i m sending

for that what i need to do

But that is not how it works. A Destination override superseeds the value assigned to the message. A sender value may supersede it as well. That is why I'm telling you to read the relevant passage in the manuals... Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » message priority not working
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.