And you most likely need to set preserveMessageQos=true http://camel.apache.org/jms
On Tue, Sep 14, 2010 at 5:39 PM, Claus Ibsen <claus.ib...@gmail.com> wrote: > What JMS broker are you using? Not all support JMSPriority. > > > On Tue, Sep 14, 2010 at 5:36 PM, Kannan <ramkannan2...@gmail.com> wrote: >> >> I tried to set message priory like below mentioned code. It didn’t work for >> me.I am not sure what changes still needed to be done. >> >> >> <route errorHandlerRef="deadLetterErrorHandler"> >> <from ref="queue1" /> >> <transacted ref="required" /> >> <convertBodyTo type="com.domain.Message" /> >> <choice> >> <when> >> <simple>${body.entity} is Foo</simple> >> <setHeader >> headerName="JMSPriority"><constant>1</constant></setHeader> >> <to ref="olapQueue" /> >> </when> >> <when> >> <simple>${body.entity} is Bar</simple> >> <setHeader >> headerName="JMSPriority"><constant>2</constant></setHeader> >> <to ref="oltpQueue" /> >> </when> >> <otherwise> >> <to ref="deadLetterQueue" /> >> </otherwise> >> </choice> >> </route> >> >> >> >> <route errorHandlerRef="deadLetterErrorHandler"> >> <from ref="queue1" /> >> <resequence> >> <header>JMSPriority</header> >> <to uri="mock:result" /> >> <batch-config batchSize="300" batchTimeout="4000" /> >> </resequence> >> <choice> >> <when> >> <simple>${body} is Foo</simple> >> <bean ref="service" method="save" /> >> </when> >> <when> >> <simple>${body.entity} is Bar</simple> >> <bean ref="userservice" method="update" /> >> </when> >> </choice> >> <transacted ref="required" /> >> </route> >> >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/example-to-set-priority-in-message-tp2839328p2839328.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> > > > > -- > Claus Ibsen > Apache Camel Committer > > Author of Camel in Action: http://www.manning.com/ibsen/ > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus