How to set the ActiveMQ redeliveryPolicy on a queue?

Posted by edbras on Stack Overflow See other posts from Stack Overflow or by edbras
Published on 2011-03-16T23:33:30Z Indexed on 2012/10/29 5:03 UTC
Read the original article Hit count: 152

Filed under:
|

How do I set the redeliveryPolicy in ActiveMQ on a Queue?

1) In the doc, see: activeMQ Redelivery, the explain that you should set it on the ConnectionFactory or Connection. But I want to use different value's for different Queue's.

2) 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:

<amq:connectionFactory id="amqConnectionFactory" brokerURL="${jms.factory.url}" >
    <amq:properties>
        <amq:redeliveryPolicy maximumRedeliveries="6" initialRedeliveryDelay="15000" useExponentialBackOff="true" backOffMultiplier="5"/>
    </amq:properties>
</amq:connectionFactory>

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:

<amq:queue id="jmsQueueDeclarationSnd"  physicalName="${jms.queue.declaration.snd}" >
    <amq:properties>
        <amq:redeliveryPolicy maximumRedeliveries="6" initialRedeliveryDelay="15000" useExponentialBackOff="true" backOffMultiplier="5"/>
    </amq:properties>
</amq:queue>

Thanks

© Stack Overflow or respective owner

Related posts about activemq

Related posts about spring-jms