This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes Reading JMS  message with highest priority Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Reading JMS  message with highest priority" Watch "Reading JMS  message with highest priority" New topic
Author

Reading JMS message with highest priority

Anish Kuti
Greenhorn

Joined: May 12, 2008
Posts: 29
Hi ,
I am using weblogic 9.2 MP3.
I am sending message(xml) to JMS queue with different priority. I want the highest priority msg to be picked first by consumer.

What I am doing -
1. Currently No consumer is listening ,so that all the message get stuck in JMS queue
2. Then I am posting xmls in JMS queue with default priority(4) first
3. Then posting few xml with Priority 9.

Now I am reading the JMS queue using java client but I am NOT getting the priority 9 message first .
Rather I am getting the message in FIFO order.

Rajesh So
Ranch Hand

Joined: Oct 08, 2002
Posts: 141
Hi Anish,

AFAIK, The priority is not guaranteed.
A JMS provider tries to deliver higher-priority messages before lower-priority ones but does not have to deliver messages in exact order of priority

All the best
Anish Kuti
Greenhorn

Joined: May 12, 2008
Posts: 29
Many Thanks Rajesh.
Business wants the high priority message to read first . Is there any way we can ensure the top priority msg read first .
Rajesh So
Ranch Hand

Joined: Oct 08, 2002
Posts: 141
Hi Anish,
JMS Specification does not have such a facility. But you can check if the JMS Provider you are using have such a functionality. What is the JMS Provider you are using? If you are using the Weblogic embedded MQ Provider, I doubt if they have. You can try with other providers like Active MQ, Websphere MQ, Tibco or any other non-opensource/commercial production grade providers.
Regards,
Raj
 
 
subject: Reading JMS message with highest priority