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

Make Retry and Circuit Breaker composable #83

Open
jbspeakr opened this issue Jun 27, 2017 · 1 comment
Open

Make Retry and Circuit Breaker composable #83

jbspeakr opened this issue Jun 27, 2017 · 1 comment

Comments

@jbspeakr
Copy link

jbspeakr commented Jun 27, 2017

I want to achieve following behaviour: Specific execution failures are first retried according to e.g. a SimpleRetryPolicy, then if the policy is exceeded the failure is recorded by the CircuitBreaker.

Although both SimpleRetryPolicy and CircuitBreakerPolicy implement RetryPolicy and can be used to forge a CompositeRetryPolicy, this seems not to be an intended use-case for Spring Retry.

It feels like the reason for this is that stateful (CircuitBreaker) and stateless retries are not (yet?) composable due to some shared global state. Or am I missing something?

@dsyer
Copy link
Member

dsyer commented Dec 12, 2017

Seems like a reasonable goal theoretically. But why would you not just change the parameters of the circuit breaker? What is the benefit of a composite that you don't get from a delegation model (as is already implemented in CircuitBreakerRetryPolicy)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants