Redelivery Policy
Messages are redelivered to a client when:
- A transacted session is used and rollback() is called.
- A transacted session is closed before commit is called.
- A session is using CLIENT_ACKNOWLEDGE and Session.recover() is called.
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 customise this.
Available Properties
| Property |
Default Value |
Description |
| collisionAvoidanceFactor |
0.15 |
The percentage of range of collision avoidance if enabled |
| maximumRedeliveries |
6 |
Sets the maximum number of times a message will be redelivered before it is considered a poisoned pill and returned to the broker so it can go to a Dead Letter Queue (use value -1 to define infinite number of redeliveries) |
| initialRedeliveryDelay |
1000L |
The initial redelivery delay in milliseconds |
| useCollisionAvoidance |
false |
Should the redelivery policy use collision avoidance |
| useExponentialBackOff |
false |
Should exponential back-off be used (i.e. to exponentially increase the timeout) |
| backOffMultiplier |
5 |
The back-off multiplier |