Search code examples
node.jsactivemq-classicamqprhea

How to view priority of Consumer using ActiveMQ dashboard?


From the ActiveMQ "Classic" documentation it seems that the broker does support Consumer prioritization. I'm trying to use this feature using nodejs and rhea library. The problem is, that there is no clear documentation how to do it - I can't even find a place to see if I managed to change priority of a consumer. The dashboard (localhost:8161) does show priority of messages, but nothing is said about priority if consumers.


Solution

  • An AMQP Receiver can set the priority of the internally created Consumer the broker creates by adding the same options as an Openwire client adds to the JMS destination. In this case it'd be done by adding the option along with the desired destination name to the address given by the Source when creating a receiver link.

    source.setAddress("queue://destination?consumer.priorty=64")
    

    I'm not to familiar with Rhea so I'm unsure the exact code to manage that but the general idea should be clear.

    An interested observer can debug this area of the broker code to see destination options being applied.