.apache.org/dead-letter-channel.html">Dead Letter Channel
The default values are:
- maximumRedeliveries = 0
- redeliveryDelay = 1000L (the initial delay)
- maximumRedeliveryDelay = 60 * 1000L
- asyncDelayedRedelivery = false
- backOffMultiplier = 2
- useExponentialBackOff = false
- collisionAvoidanceFactor = 0.15d
- useCollisionAvoidance = false
- retriesExhaustedLogLevel = LoggingLevel.ERROR
- retryAttemptedLogLevel = LoggingLevel.DEBUG
- logRetryAttempted = true
- logRetryStackTrace = false
- logStackTrace = true
- logHandled = false
- logExhausted = true
- logExhaustedMessageHistory = true
Setting the maximumRedeliveries to a negative value such as -1 will then always redeliver (unlimited). Setting the maximumRedeliveries to 0 will disable redelivery.
This policy can be configured either by one of the following two settings:
- using conventional options, using all the options defined above
- using delay pattern to declare intervals for delays
Note: If using delay patterns then the following options is not used (delay, backOffMultiplier, useExponentialBackOff, useCollisionAvoidance)
Using delay pattern:
The delay pattern syntax is:
limit:delay;limit 2:delay 2;limit 3:delay 3;...;limit N:delay N.
How it works is best illustrate with an example with this pattern:
delayPattern=5:1000;10:5000:20:20000 The delays will be for attempt in range 0..4 = 0 millis, 5..9 = 1000 millis, 10..19 = 5000 millis, >= 20 = 20000 millis.
If you want to set a starting delay, then use 0 as the first limit, eg:
0:1000;5:5000 will use 1 sec delay until attempt number 5 where it will use 5 seconds going forward.
@version