ActiveMQ, Camel, RedeliveryDelay configuration is not used, immediate redlivery instead.
We are using a Camel/ActiveMQ/Spring configuration. We have setup a persistent queue backed by Kaha, and transactional configuration using org.springframwork.jms.connection.JmsTransactionManager.
We are trying to get the exception/re-delivery working correctly, and find that while the maximumRedeliveries configuration is honored, the redeliveryDelay is not. Rather, redelivery is executed immediately when the exceptioning consumer is finished executing it's rollback/close/synchronization logic.
Any input/experience would help...
The most confusing thing here, is that there redelivery count is honored, and running the code in the debugger we see the redeliveryDelay is set, and calculated correctly. There is even a scheduled task set to redeliver the message. However, as the infrastructure (ActiveMQMessageConsumer) is iterating through it's synchronizations during the rollback processing, a call to ActiveMQMessageConsumer.synchronization.afterRollback() results in an immediate redelivery of the message.
check the cache level. The consumer (where amq does redelivery) is
probably closed after each receipt, so the broker just does a
redispatch to one of the other available consumers.
The broker redelivery plugin can help but the root cause is session
level transaction enlistment which is done on session create.