setting JMS Priroity 9

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

setting JMS Priroity 9

cperi8
 I am setting the JMS Priority Header 9. But when the message goes out of queue it  does not havethe priority  9 it is always showing 4. Here is the code snippet to outbound queue

setHeader("JMSPriority", constant(9))
And also I  to set preserveMessageQos=true on the jms endpoint. Still no good.
What I am doing wrong here.

Appreicate any help

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: setting JMS Priroity 9

Raul Kripalani
Hey,

Are you using ActiveMQ as a broker? If yes, have you enabled prioritized
messages broker-side?
http://activemq.apache.org/how-can-i-support-priority-queues.html

Regards,

*Raúl Kripalani*
Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
Integration specialist
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk

On Sun, Sep 20, 2015 at 2:07 AM, cperi8 <[hidden email]> wrote:

>  I am setting the JMS Priority Header 9. But when the message goes out of
> queue it  does not havethe priority  9 it is always showing 4. Here is the
> code snippet to outbound queue
>
> setHeader("JMSPriority", constant(9))
> And also I  to set preserveMessageQos=true on the jms endpoint. Still no
> good.
> What I am doing wrong here.
>
> Appreicate any help
>
> Thanks
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/setting-JMS-Priroity-9-tp5771688.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: setting JMS Priroity 9

cperi8
Hey Raul Thanks for the reply.

I am using IBM MQ/Websphere Message Broker. Here is more detail . Do I need to configure from WMB broker side?

In my RouteBuilder am doing this :

exchange.getOut.setHeader("JMSPriority",9);
exchange.getOut.setHeader("JMSMessageId", 1234);

then in the endpoint - I am doing this

.to(mq:queue:<queueName>?preserveMessageQos=true,explicitQosEnabaled=false"
.log("${header.JMSPriority} and ${header.JMSMessageId}")
.end();

In the application log  the JMSPriority  says 9. But in the actual JMS Message the priority says as 4.

Thanks