I got some issues with Camel and Activemq on a OSGI environment (Karaf). I would like that messages in the queue will be redelivered if it has failed! But i want to put a delay before retrying.
I found the class org.apache.activemq.RedeliveryPolicy. I configured a bean in my blueprint xml with the different properties as bellow:
<bean id="redeliveryPolicy" class="org.apache.activemq.RedeliveryPolicy">
<property name="initialRedeliveryDelay" value="2000" />
<property name="redeliveryDelay" value="15000" />
<property name="useExponentialBackOff" value="true" />
<property name="backOffMultiplier" value="5" />
<property name="maximumRedeliveryDelay" value="120000" />
<property name="maximumRedeliveries" value="20" />
<property name="queue" value="*" />
</bean>
When i test this configuration, in case of an error the queue retry as many times it is configured in "maximumRedeliveries" property. But there is no delay between redelivery. In fact initialRedelivery works, but just for the first retry. I have searched in different sites and i'm not the only one who got these issue.
(Ps: I put my redeleveryPolicy Bean in my org.apache.activemq.ActiveMQConnectionFactory )
Thanks for your answers
(I apologize for my english Grammar)