Sam Mefford opened SPR-17477 and commented

While Spring Retry has an ExponentialRandomBackOffPolicy, Spring org.springframework.util.backoff only has ExponentialBackOff, with no random features.  Since org.springframework.util.backoff is reusable on many projects (such as with RestTemplate, see #17922), this functionality could be generally useful.  

Since Spring Retry isn't async, its utility is limited.  And Spring Retry's ExponentialRandomBackOffPolicy is tied to its blocking implementation, with a call to Thread.sleep hard-coded in the only Sleeper implementation. 

It could be beneficial for use cases which require async to have access to a general-purpose ExponentialRandomBackOffPolicy implementation.


Reference URL: https://github.com/spring-projects/spring-retry/blob/master/src/main/java/org/springframework/retry/backoff/ExponentialRandomBackOffPolicy.java

Comment From: snicoll

With no further interest from the community in several years, I am going to close this and would recommend using spring-retry if you have such requirements. We need to keep a fine line between core contract and extended feature in the cre container. If something in spring-retry doesn't meet your expectation, please raise the issue there.