aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes JMS message.setJMSPriority(int) not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS message.setJMSPriority(int) not working" Watch "JMS message.setJMSPriority(int) not working" New topic
Author

JMS message.setJMSPriority(int) not working

Gerald Luckenbill
Greenhorn

Joined: Nov 05, 2003
Posts: 15
Hi,
I am trying to set the priority of a message that is sent to a queue:
My code:
Message message = my_session.createMessage();
message.setJMSCorrelationID(_correlationId);
System.out.println("set priority to 8 for zero byte");
System.out.println("default priority is: " + message.getJMSPriority());
message.setJMSPriority(8);
System.out.println("after set priority is: " + message.getJMSPriority());
is not working in that when you look at the queue (IBM MQ series BTW) the message has a priority of 4. Even though my last call to message.getJMSPriority()); in the above code returns an 8.
I can successfully set the priority on the Queue object but I need to set it at the message level?
Many Thanks
 
 
subject: JMS message.setJMSPriority(int) not working
 
Similar Threads
query
jms highst priority value
Thread Related Problem
MDB
JMS Priority