Configuring UniformRandomBackOffPolicy (using annotations)

In this post, under Spring Retry I will show with example how to configure UniformRandomBackOffPolicy 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 Service14 { 11…… Continue reading Configuring UniformRandomBackOffPolicy (using annotations)

Configuring UniformRandomBackOffPolicy for RetryTemplate (using RetryTemplateBuilder)

In this post under Spring Retry, I will show with example how to configure UniformRandomBackOffPolicy using RetryTemplateBuilder. But before that lets recap what is UniformRandomBackOffPolicy. UniformRandomBackOffPolicy chooses a random time in ms between user configured MinBackOffPeriod and MaxBackOffPeriod and then before a failed operations is retried, it pauses for that time. For our example we…… Continue reading Configuring UniformRandomBackOffPolicy for RetryTemplate (using RetryTemplateBuilder)

UniformRandomBackOffPolicy Example (using xml configuration)

In this post under Spring Retry, I will explain with example how to use UniformRandomBackOffPolicy (another implementation of BackOffPolicy interface). UniformRandomBackOffPolicy chooses a random time in ms between user configured MinBackOffPeriod and MaxBackOffPeriod and then before a failed operations is retried, it pauses for that time. Below is the xml configuration code. XML code 1…… Continue reading UniformRandomBackOffPolicy Example (using xml configuration)