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 » Priority for queue

Post new topic  Reply to topic
 Priority for queue « View previous topic :: View next topic » 
Author Message
sumeet
PostPosted: Sun Mar 21, 2004 4:26 pm    Post subject: Priority for queue Reply with quote

Novice

Joined: 16 Mar 2004
Posts: 16

Hi all,

Background:
We have a queue manager QM with 2 queues, Q1 & Q2.
Messages M1 & M2, with priorities 2 & 3 are put on Q1.
Messages M3 & M4, with priorities 7 & 8 are put on Q2.
This queue manager is not connected with the destination queue manager when the messages are put on the queues.

Objective:
What we are planning is that we set Q1 at a higher priority than Q2 so that when communication is available between QM and destination queue manager, messages M1 & M2 (which are low priority as compared to M3 & M4) go out first, since they are present on Q1 (higher priority)

Questions:
1) Is it possible to set priorities at queue level, like message level? If yes, how? Does JMS provide some API to do that or is that a MQ Series configuration?

My understanding is that if 4 messages are present with varying priorities, then irrespective of whether they are on different queues or same queue, they will go out in the order of priorities when communication is made available.

Please advice,

Thanks & Regards,
Sumeet
Back to top
View user's profile Send private message
gunter
PostPosted: Mon Mar 22, 2004 1:42 am    Post subject: Reply with quote

Partisan

Joined: 21 Jan 2004
Posts: 307
Location: Germany, Frankfurt

Priority is not a property of a queue but of a message, You can set it by the application. If the application use MQPRI_PRIORITY_AS_Q_DEF it will take the value from the queue definition(DEFPRTY).

In JMS, you have to set PRIORITY with JMSAdmin to one of these values:
    APP - is defined by the application
    QDEF - takes the value of der queue defaults
    0-9 - sets this value
Look at 'Websphere MQ Using Java'

Make sure, that on the transmission queue MSGDLVSQ is set to PRIORITY.
_________________
Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3
Back to top
View user's profile Send private message
sumeet
PostPosted: Tue Mar 23, 2004 8:19 pm    Post subject: Reply with quote

Novice

Joined: 16 Mar 2004
Posts: 16

Quote:
Priority is not a property of a queue but of a message

So what we are saying is that if we assign a queue a priority, what we are effectively doing is that we are ensuring all messages which are put on that queue are sent under that priority.
Would the above be a fair statement?

Cheers,
sumeet
Back to top
View user's profile Send private message
EddieA
PostPosted: Tue Mar 23, 2004 9:37 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
Would the above be a fair statement

Not quite. As Gunter stated in his reply, the default when PUTting a message is AS_Q_DEF, which means the message will get the Priority defined at the Queue level. However, this can be overridden by the application before the message is PUT.

Once the message has been PUT, the message then has that Priority for it's lifetime, no matter what the Priority of the Queues it travels through on it's journey.

Every Queue, including XMIT Queues, also have a setting, MSGDLVSQ, which can affect the order messages are read. PRIORITY, the default, states that messages are delivered FIFO within Priority. The alternative setting, FIFO, delivers messages in the order they were received into the Queue.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

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