1 Reply Latest reply on Jun 16, 2010 9:26 AM by Claus Ibsen

    ActiveMQ support JMS Priority

    furzana Newbie



      I use activemq 5.3.1. I want to set priority to a message, so that high priority message will get consumed first in a queue.


      I did the following code changes,

      - enabled explicitQOSEnabled to true

      - jmsTemplate.setPriority(9);

      - jmsTemplate.afterPropertiesSet();

      - TextMessage msg.setJMSPriority(9);


      The message is pushed to the queue properly and consumed properly, but the order is not changed. It is consumed in the order i put the messages in the queue.


      Have i missed to do any configuration in activemq to support priority?


      Is there any other way to set priority to specific messages, so that high priority messages are consumed first?