How to configure delay time in Spring-retry (Spring Boot)
You can achieve that with this configuration:
@Retryable(
maxAttempts=3,
value=RuntimeException.class,
backoff = @Backoff(
delay = 300000,
multiplier = 2,
maxDelay = 900000
)
)
Invocations:
- After 5m ~
Delay = 300000
- After 10m ~
Delay = 300000 * 2 = 600000
- After 15m ~
Delay = 600000 * 2 = 1200000 with Max Delay of 900000