Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading JMS message with highest priority

 
Anish Kuti
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 149
 
Anish Kuti
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic