This content has been marked as final. Show 3 replies
To set the priority when sending a message, use the following message on MessageProducer:
void send(Message message, int deliveryMode, int priority, long timeToLive)
Sends a message to the destination, specifying delivery mode, priority, and time to live.
Alternatively you can set the default priority for a MessageProducer by calling
Note that the following method on Message is for a different purpose and hould not be used
void setJMSPriority(int priority)
The JMS 1.1 specification contains the following explanation of message priority.
JMS defines a ten-level priority value, with 0 as the lowest priority and 9 as the
highest. In addition, clients should consider priorities 0-4 as gradations of
normal priority and priorities 5-9 as gradations of expedited priority.
JMS does not require that a provider strictly implement priority ordering of
messages; however, it should do its best to deliver expedited messages ahead
of normal messages.
22.214.171.124 Order of Message Sends
• Messages of higher priority may jump ahead of previous lower-priority messages.