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.