Author |
Message
|
gayathri |
Posted: Wed Jun 08, 2005 4:30 am Post subject: MQ prioirty |
|
|
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 |
|
 |
mqmhr |
Posted: Wed Jun 08, 2005 4:36 am Post subject: |
|
|
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 |
|
 |
gayathri |
Posted: Wed Jun 08, 2005 5:04 am Post subject: MQpriority |
|
|
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 |
|
 |
mqmhr |
Posted: Wed Jun 08, 2005 5:10 am Post subject: |
|
|
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 |
|
 |
gayathri |
Posted: Thu Jun 09, 2005 12:04 am Post subject: Message Priority |
|
|
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 |
|
 |
bower5932 |
Posted: Thu Jun 09, 2005 2:04 am Post subject: Re: Message Priority |
|
|
 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 |
|
 |
Bravo |
Posted: Sun Oct 16, 2005 7:06 pm Post subject: |
|
|
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 |
|
 |
Mr Butcher |
Posted: Sun Oct 16, 2005 10:07 pm Post subject: |
|
|
 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 |
|
 |
Bravo |
Posted: Mon Oct 17, 2005 6:09 am Post subject: |
|
|
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 |
|
 |
jefflowrey |
Posted: Mon Oct 17, 2005 6:13 am Post subject: |
|
|
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 |
|
 |
Bravo |
Posted: Mon Oct 17, 2005 5:46 pm Post subject: |
|
|
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 |
|
 |
wschutz |
Posted: Mon Oct 17, 2005 6:01 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
|
Back to top |
|
 |
|