camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: example to set priority in message?
Date Tue, 14 Sep 2010 15:39:38 GMT
What JMS broker are you using? Not all support JMSPriority.


On Tue, Sep 14, 2010 at 5:36 PM, Kannan <ramkannan2003@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

Mime
View raw message