Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ExponentialRandomBackOffPolicy [SPR-17477] #22009

Open
spring-issuemaster opened this issue Nov 7, 2018 · 0 comments

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Nov 7, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.