Commit 10566f42 authored by Ronak Sakhuja's avatar Ronak Sakhuja
Browse files

Update AzureCircuitBreakerConfiguration.java

parent 0ca0dc8b
Pipeline #55214 failed with stage
in 1 minute and 52 seconds
......@@ -47,9 +47,21 @@ public class AzureCircuitBreakerConfiguration {
* @return newly created CircuitBreakerRegistry.
*/
private CircuitBreakerRegistry createCBR() {
// TODO : THIS CHANGE IS ONLY FOR TESTING PURPOSE ON DEV
CircuitBreakerConfig circuitBreakerConfig = CircuitBreakerConfig.custom()
.failureRateThreshold(50)
.waitDurationInOpenState(Duration.ofMillis(10000))
.permittedNumberOfCallsInHalfOpenState(5)
.slidingWindowSize(5)
.minimumNumberOfCalls(5)
.build();
circuitBreakerRegistry =
CircuitBreakerRegistry.ofDefaults();
// Create a CircuitBreakerRegistry with a custom global configuration
CircuitBreakerRegistry circuitBreakerRegistry =
CircuitBreakerRegistry.of(circuitBreakerConfig);
// circuitBreakerRegistry =
// CircuitBreakerRegistry.ofDefaults();
// return circuitBreakerRegistry;
return circuitBreakerRegistry;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment