Author |
Message
|
hin3407 |
Posted: Fri Aug 17, 2007 6:40 am Post subject: Message Priority |
|
|
Centurion
Joined: 17 Oct 2006 Posts: 120
|
I have a question regarding Message Priority.
If an applications enqueue rate is faster than anothers dequeue rate, and messages that are put to this queue have different message priorities. Will those that have higher values be bumped to the top of the list prior to being processed.
But this should only be valid if MQSeries has enough time to move those messages to the top of the list? Or is message priority valid in a batch mode when messages sit on a queue for sometime prior to being picked off at a later date or time?
Thanks. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Aug 17, 2007 7:17 am Post subject: |
|
|
Guest
|
Two issues here: one is the message priority as set in the MQMD; the other issue is the message delivery sequence setting of the queue.
If queue message delivery sequence is set to Priority, then messages will be delivered out of the queue in priority sequence AND first-in-first-out within priority. This applies to batch and online applications equally.
"if MQSeries has enough time to move those messages to the top of the list" MQ doesn't rearrange (sort) the queue when a new message arrives, so this should not be an issue for your applications. |
|
Back to top |
|
 |
hin3407 |
Posted: Fri Aug 17, 2007 7:23 am Post subject: |
|
|
Centurion
Joined: 17 Oct 2006 Posts: 120
|
The MQMD is set to 9 for some messages, and 0 for others. The default Queue priority is indeed set to priority.
So are you saying that even if there is a backlog of messages when the application is not able to dequeue as fast as enqueue, the messages with higher priority should be processesed faster than those that are at prioritity 0? |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Aug 17, 2007 7:41 am Post subject: |
|
|
Guest
|
I did not use the term "processed faster" deliberately, since I don't know what your applications do with the messages.
Higher priority messages (9, in your example) will be delivered out of the queue ahead of lower priority messages (0, in your example).
It is possible that priority 0 messages (lower priority) might never be processed if priority 9 messages (higher priority) continually arrive at the queue. This is an application architecture issue, not an MQ issue.
Last edited by bruce2359 on Fri Aug 17, 2007 7:46 am; edited 1 time in total |
|
Back to top |
|
 |
hin3407 |
Posted: Fri Aug 17, 2007 7:45 am Post subject: |
|
|
Centurion
Joined: 17 Oct 2006 Posts: 120
|
Thanks for the reply.
The applications are extracting the messages from the queue. The application is doing a basic get, not concerned with message or correlation ID.
Does that help? |
|
Back to top |
|
 |
elvis_gn |
Posted: Fri Aug 17, 2007 8:34 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi hin3407,
hin3407 wrote: |
The applications are extracting the messages from the queue. The application is doing a basic get, not concerned with message or correlation ID.
Does that help? |
If the application is doing a basic get then it will first get the message with the highest priority.
If you don't want to get messages by priority, then set the 'Message Delivery Sequence' as FIFO.
Regards. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Aug 17, 2007 10:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
hin3407 wrote: |
The applications are extracting the messages from the queue. The application is doing a basic get, not concerned with message or correlation ID.
|
If the queue is set to delivery as priority, a backlog develops and high priority messages arrive at a speed equal to or greater than the speed with which the messages are processed then the low priority messages will never be processed. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 17, 2007 10:15 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I think hin3407 is hinting at an obscure passage on MDBs.
IIRC: the MDB has a refresh rate (where it goes looking for messages on the queue). If the high priority messages were received between 2 scans (refresh rate interval) the next message consumed will not take into account any messages delivered during that interval, providing there are enough messages on the queue to last for the interval's consumption rate. This will impact priority delivery.
As well it takes a certain time for the queue manager to advance the latest message (with highest priority) received to the top of the stack... This too will interfere with the MDB's strict priority delivery of messages for the same reason.
Usually this is quite negligeable. However I understand that in particular circumstances it can have an adverse effect.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Fri Aug 17, 2007 11:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
This Java stuff is just weird....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|