use of io.gravitee.definition.model.Failover in project gravitee-gateway by gravitee-io.
the class FailoverInvoker method afterPropertiesSet.
@Override
public void afterPropertiesSet() throws Exception {
Failover failover = api.getProxy().getFailover();
circuitBreaker = CircuitBreaker.create("cb-" + api.getId(), vertx, new CircuitBreakerOptions().setMaxRetries(// number of failure before opening the circuit
failover.getMaxAttempts()).setTimeout(// consider a failure if the operation does not succeed in time
failover.getRetryTimeout()).setResetTimeout(// time spent in open state before attempting to re-try
10000L).setNotificationAddress(null));
}
Aggregations