Is your feature request related to a problem? Please describe.
Right now as of v3.2.1, there's no possibility to customize openTimeout&resetTimeout intuitively as in https://docs.spring.io/spring-cloud-circuitbreaker/reference/spring-cloud-circuitbreaker-spring-retry.html.
I've tried to configure my own CircuitBreakerRetryPolicy as below...
CircuitBreakerRetryPolicy circuitBreakerRetryPolicy = new CircuitBreakerRetryPolicy(new SimpleRetryPolicy(maxAttempts));
circuitBreakerRetryPolicy.setOpenTimeout(openTimeout);
circuitBreakerRetryPolicy.setResetTimeout(resetTimeout);
springRetryConfigBuilder.retryPolicy(circuitBreakerRetryPolicy).build();
But it failed since SpringRetryConfigBuilder wraps it inside another CircuitBreakerRetryPolicy hardcoded w/ default timeouts.
So the only possibility to customize the timeouts I see here is to implement my own whole new SpringRetryCircuitBreakerFactory...
Describe the solution you'd like
A simple & intuitive way to customize openTimeout&resetTimeout.
Describe alternatives you've considered
- New APIs in
org.springframework.cloud.circuitbreaker.springretry.SpringRetryConfigBuilder to set openTimeout&resetTimeout, or...
org.springframework.cloud.circuitbreaker.springretry.SpringRetryConfigBuilder#retryPolicy should smartly recognize incoming CircuitBreakerRetryPolicy & stop wrapping it in the hardcoded CircuitBreakerRetryPolicy in that case.
Additional context
n/a
Is your feature request related to a problem? Please describe.
Right now as of v3.2.1, there's no possibility to customize
openTimeout&resetTimeoutintuitively as in https://docs.spring.io/spring-cloud-circuitbreaker/reference/spring-cloud-circuitbreaker-spring-retry.html.I've tried to configure my own
CircuitBreakerRetryPolicyas below...But it failed since
SpringRetryConfigBuilderwraps it inside anotherCircuitBreakerRetryPolicyhardcoded w/ default timeouts.So the only possibility to customize the timeouts I see here is to implement my own whole new SpringRetryCircuitBreakerFactory...
Describe the solution you'd like
A simple & intuitive way to customize
openTimeout&resetTimeout.Describe alternatives you've considered
org.springframework.cloud.circuitbreaker.springretry.SpringRetryConfigBuilderto setopenTimeout&resetTimeout, or...org.springframework.cloud.circuitbreaker.springretry.SpringRetryConfigBuilder#retryPolicyshould smartly recognize incomingCircuitBreakerRetryPolicy& stop wrapping it in the hardcodedCircuitBreakerRetryPolicyin that case.Additional context
n/a