title: How to set the ActiveMQ redeliveryPolicy on a queue?
body: <p>How do I set the redeliveryPolicy in ActiveMQ on a Queue?</p>
  
  <p><strong>1)</strong> In the doc, see: <a href="http://activemq.apache.org/redelivery-policy.html">activeMQ Redelivery</a>, the explain that you should set it on the ConnectionFactory or Connection. But I want to use different value's for different Queue's.</p>
  
  <p><strong>2)</strong> Apart from that, I don't seem to get it work. Setting it on the connection factory in Spring (I am using activemq 5.4.2. with Spring 3.0) like this don't seem to have any effect:</p>
  
  <pre><code>&lt;amq:connectionFactory id="amqConnectionFactory" brokerURL="${jms.factory.url}" &gt;
      &lt;amq:properties&gt;
          &lt;amq:redeliveryPolicy maximumRedeliveries="6" initialRedeliveryDelay="15000" useExponentialBackOff="true" backOffMultiplier="5"/&gt;
      &lt;/amq:properties&gt;
  &lt;/amq:connectionFactory&gt;
  </code></pre>
  
  <p>I also tried to set it as property on the defined Queue, but that also seem to be ignored as the redelivery occurs sooner that the defined values:</p>
  
  <pre><code>&lt;amq:queue id="jmsQueueDeclarationSnd"  physicalName="${jms.queue.declaration.snd}" &gt;
      &lt;amq:properties&gt;
          &lt;amq:redeliveryPolicy maximumRedeliveries="6" initialRedeliveryDelay="15000" useExponentialBackOff="true" backOffMultiplier="5"/&gt;
      &lt;/amq:properties&gt;
  &lt;/amq:queue&gt;
  </code></pre>
  
  <p>Thanks</p>