Redelivery PolicyDetail on when messages are redelivered to a client can be found in the Message Redelivery and DLQ Handling section. You can configure the RedeliveryPolicy on your ActiveMQConnectionFactory or ActiveMQConnection to customize exactly how you want the redelivery to work. You can use Java code, Spring or the Connection Configuration URI to customize this. Available Properties
RedeliveryPolicy per DestinationAs of ActiveMQ v5.7.0 you can now configure a RedeliveryPolicy on a per-destination bases. The ActiveMQConnection connection ... // Create a connection RedeliveryPolicy queuePolicy = new RedeliveryPolicy(); queuePolicy.setInitialRedeliveryDelay(0); queuePolicy.setRedeliveryDelay(1000); queuePolicy.setUseExponentialBackOff(false); queuePolicy.setMaximumRedeliveries(2); RedeliveryPolicy topicPolicy = new RedeliveryPolicy(); topicPolicy.setInitialRedeliveryDelay(0); topicPolicy.setRedeliveryDelay(1000); topicPolicy.setUseExponentialBackOff(false); topicPolicy.setMaximumRedeliveries(3); // Receive a message with the JMS API RedeliveryPolicyMap map = connection.getRedeliveryPolicyMap(); map.put(new ActiveMQTopic(">"), topicPolicy); map.put(new ActiveMQQueue(">"), queuePolicy); |