Message priority in JMS plugin with ActiveMQ

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Message priority in JMS plugin with ActiveMQ

mmigdol
Hello,

I'm trying to implement message prioritization using the JMS plugin with Active MQ.  I created a "high-priority" template in Config.groovy as follows:
jms {
    templates {
        high {
            meta {
                parentBean = 'standardJmsTemplate'
            }
            explicitQosEnabled = 'true'
            priority = 10            
        }
}

... and I use that template when sending high priority messages.  I've confirmed that the messages are queued with the correct value set for their priority.

Unfortunately, it looks like ActiveMQ does NOT enable priority-based de-queuing by default.  (See here).  So it looks like I need to set a property on the default policy to enable this.

This post describes how to set per-destination properties programmatically.  Can someone help me out with the Config DSL syntax necessary to set the "prioritizedMessages" property on the default policy to true?  

Or is there an easier way to accomplish this...
Loading...