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 » IBM MQ Java / JMS » MQ prioirty

Post new topic  Reply to topic
 MQ prioirty « View previous topic :: View next topic » 
Author Message
gayathri
PostPosted: Wed Jun 08, 2005 4:30 am    Post subject: MQ prioirty Reply with quote

Apprentice

Joined: 07 Jun 2005
Posts: 36

Hi,

How to read the high priority messages before the low priority ones using MQI calls for java.

Gayathri.
Back to top
View user's profile Send private message
mqmhr
PostPosted: Wed Jun 08, 2005 4:36 am    Post subject: Reply with quote

Centurion

Joined: 28 Dec 2004
Posts: 105

Assuming that the MessageDeliverySequence of the queue is set to Priority, messages with higher priority will be placed ahead than the lower priority messages in the queue. So you just have to get these messages in a sequential manner to ensure that the higher priority messages are got first. For more details, refer to Chapter 10 of AP Guide.
Back to top
View user's profile Send private message
gayathri
PostPosted: Wed Jun 08, 2005 5:04 am    Post subject: MQpriority Reply with quote

Apprentice

Joined: 07 Jun 2005
Posts: 36

Hi,

Thanks for the reply. In that case shall I assume that it is the responsibility of the queue manager to place the high priority messages before the low priority one.

Where is the AP reference available. Would you please provide me with the link

Gayathri.
Back to top
View user's profile Send private message
mqmhr
PostPosted: Wed Jun 08, 2005 5:10 am    Post subject: Reply with quote

Centurion

Joined: 28 Dec 2004
Posts: 105

Quote:
In that case shall I assume that it is the responsibility of the queue manager to place the high priority messages before the low priority one.


Yes, and you need to set the priority value in the MQMD header of the message in your application. The links to AP Guide and Reference are available in the Documentation link at the top of this page.
Back to top
View user's profile Send private message
gayathri
PostPosted: Thu Jun 09, 2005 12:04 am    Post subject: Message Priority Reply with quote

Apprentice

Joined: 07 Jun 2005
Posts: 36

Hi,

Thanks a lot for your help.

To retrieve the messages based on priority the following steps has to be done

1) Set a value for the priority field in MQMD
2)Internally the Queue manager will group the messages based on the prioroty
3)When issuing the get call the high priority messages are retrieved first.

Should I specify the MsgDeliverySequence field when creating the queue?

Thanks,
Gayathri
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Jun 09, 2005 2:04 am    Post subject: Re: Message Priority Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

gayathri wrote:
Should I specify the MsgDeliverySequence field when creating the queue?


Yes.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Bravo
PostPosted: Sun Oct 16, 2005 7:06 pm    Post subject: Reply with quote

Centurion

Joined: 03 Oct 2005
Posts: 146

Hi Guys,

I have to set the priority on the messages but it is more than 9 messages.How can I handle this situations?

Any suggestions.
_________________
Bravo
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Sun Oct 16, 2005 10:07 pm    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

if every message has to have its own priority then you cant.
ther is only 0 - 9, and you can give multiple messages the same priority if that helps.

to me it looks like that you are looking for something like a key to read messages in a specific order?!? then msgid or correlid is probably what you are looking for cause they can be used as "keys" to get specific messages........ or maybe message groups can help.

what exactly are you trying to do?
_________________
Regards, Butcher
Back to top
View user's profile Send private message
Bravo
PostPosted: Mon Oct 17, 2005 6:09 am    Post subject: Reply with quote

Centurion

Joined: 03 Oct 2005
Posts: 146

Thanks for your quick response!!!

Well I have couple messages

Say..

A1 upto A12..I need to process based on the order it has given using Java MQI call.I have set the priority till 12 even though the priority is MAX of 0-9.It processed with warning messages.But I want to get rid of the warning messages which shows up in error log.

How can be handle this situation?

Any suggestions
_________________
Bravo
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Oct 17, 2005 6:13 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Priority has little to do with the order that messages are sent in.

You can not set priority to anything other than the 10 values 0 through 9.

You should have no difficulties preserving the order that messages are sent in, without doing anything special.

You should try very hard to avoid needing to process messages in a particular order. This is called message affinity, and is troublesome for a lot of things.

If you do need to process messages in a specific order, you should look at message grouping and NOT priority.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Bravo
PostPosted: Mon Oct 17, 2005 5:46 pm    Post subject: Reply with quote

Centurion

Joined: 03 Oct 2005
Posts: 146

Thanks Jeff,

Could you please throw some inputs on message grouping.How it works and How can I handle in my scenario?.
_________________
Bravo
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Oct 17, 2005 6:01 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Read about GroupIDs in the documentation and have a look at the "group" samples here:

http://www.developer.ibm.com/isv/tech/sampmq.html

Good luck
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ prioirty
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.