title: Enabling Priority with activemq using camel
body: <p>After trying to activate priority with activemq, I was told to try using camel (see <a href="https://stackoverflow.com/questions/8849350/priority-with-activemq">here</a>). But I can't get it working, and I'm not even sure how it should work.</p>
  
  <p>I've added the following code, in my spring configuration:</p>
  
  <pre><code>&lt;camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"&gt;
    &lt;route&gt;
      &lt;from uri="jms:queue:myqueue" /&gt;
      &lt;resequence&gt;
        &lt;batch-config batchSize="200" batchTimeout="3000" allowDuplicates="true" reverse="true"/&gt;
        &lt;header&gt;JMSPriority&lt;/header&gt;
      &lt;to uri="mock:result"/&gt;
      &lt;/resequence&gt;
     &lt;/route&gt;
  &lt;/camelContext&gt;
  
  &lt;bean id="jmsConfig" class="org.apache.camel.component.activemq.ActiveMQConfiguration"&gt;
    &lt;property name="connectionFactory" ref="pooledConnectionFactory"/&gt;
    &lt;property name="transacted" value="false"/&gt;
    &lt;property name="concurrentConsumers" value="10"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="activemq" class="org.apache.camel.component.activemq.ActiveMQComponent"&gt;
    &lt;property name="configuration" ref="jmsConfig"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>But this configuration doesn't work (nothing is ordered), and I have a few questions:</p>
  
  <ul>
  <li>What does <code>mock:result</code> mean? I couldn't find it in the documentation.</li>
  <li>How is camel supposed to re-order the queue, is it done after the messages were created, or when a message is added?</li>
  <li>Can it be independent from the spring activemq basic configuration? (I use here the camel ActiveMQComponent)</li>
  </ul>