Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

JMS message.setJMSPriority(int) not working  RSS feed

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!