Switch defaults of open and reset timeouts
This commit is contained in:
@@ -75,17 +75,17 @@ public @interface CircuitBreaker {
|
||||
* to give the downstream component a chance to respond again.
|
||||
*
|
||||
* @return the timeout before an open circuit is reset in milliseconds, defaults to
|
||||
* 5000
|
||||
* 20000
|
||||
*/
|
||||
long resetTimeout() default 5000;
|
||||
long resetTimeout() default 20000;
|
||||
|
||||
/**
|
||||
* When {@link #maxAttempts()} failures are reached within this timeout, the circuit
|
||||
* is opened automatically, preventing access to the downstream component.
|
||||
*
|
||||
* @return the timeout before an closed circuit is opened in milliseconds, defaults to
|
||||
* 20000
|
||||
* 5000
|
||||
*/
|
||||
long openTimeout() default 20000;
|
||||
long openTimeout() default 5000;
|
||||
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ public class CircuitBreakerRetryPolicy implements RetryPolicy {
|
||||
private static Log logger = LogFactory.getLog(CircuitBreakerRetryPolicy.class);
|
||||
|
||||
private final RetryPolicy delegate;
|
||||
private long resetTimeout = 5000;
|
||||
private long openTimeout = 20000;
|
||||
private long resetTimeout = 20000;
|
||||
private long openTimeout = 5000;
|
||||
|
||||
public CircuitBreakerRetryPolicy(RetryPolicy delegate) {
|
||||
this.delegate = delegate;
|
||||
|
||||
Reference in New Issue
Block a user