I used custom headers instead of JMSPriority to resequence message based on
custom priority header. where as  the consumer is not consuming  based on
resequence order.

<route errorHandlerRef="deadLetterErrorHandler">
      <from ref="queue1" />
       <resequence>
           <simple>${header.msgPriority}<simple>                 
         <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-tp2839328p2839369.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to