Configuring ExponentialBackOffPolicy (using annotations)

In this post, under Spring Retry I will show with example how to configure ExponentialBackOffPolicy using annotations. For our example we will use the below service class Service class 1 package defaultPackage; 2 3 import java.util.Date; 4 5 import org.springframework.retry.annotation.Backoff; 6 import org.springframework.retry.annotation.Retryable; 7 import org.springframework.stereotype.Service; 8 9 @Service 10 public class Service15 { 11…… Continue reading Configuring ExponentialBackOffPolicy (using annotations)

Configuring ExponentialBackOffPolicy for RetryTemplate (using RetryTemplateBuilder)

In this post under Spring Retry, I will show with example how to configure ExponentialBackOffPolicy using RetryTemplateBuilder. First lets recap what is ExponentialBackOffPolicy is. ExponentialBackOffPolicy increases the backoff period at every retry attempt by a specified number. ExponentialBackOffPolicy requires three inputs for it to work, which are1) initialInterval –> the backoff period used at first…… Continue reading Configuring ExponentialBackOffPolicy for RetryTemplate (using RetryTemplateBuilder)

ExponentialBackOffPolicy Example (using xml configuration)

In this post under Spring Retry, I will introduce with example another out of the box implementation of BackOffPolicy i.e., ExponentialBackOffPolicy. ExponentialBackOffPolicy increases the backoff period at every retry attempt by a specified number. ExponentialBackOffPolicy requires three inputs for it to work, which are1) initialInterval –> the backoff period used at first retry2) maxInterval –>…… Continue reading ExponentialBackOffPolicy Example (using xml configuration)