Excellent explanation, I have seen that it is not common to work with paging in resilience, the question is, if you have some microservices applying paging... if I return a list or a String through the resilience endpoint... what would be the logic of use pagination...? ... the idea is to have a cleaner and safer code from the resilience service, but if I apply paging I am practically developing the same microservice that implements it....
Thanks for this good content. I have one doubt, suppose in your case each retry is making 3 calls to the server, but this 3 is counted 1 as one for the circuitbreaker, what if I wanted to count the retries also in the circuitbreaker. means one call = 3 retries = 3 failurecall in circuitbreaker.
Thank you for such clear explanation. I have one query. If the minimum number of calls is set to 5 and failure rate threshold is 60%. Then ideally circuit breaker should be open after 3 calls only because 60% of 5 = 3. Then why circuit breaker didn’t open after 3 calls and only after 5 calls? Hoping for a response. Thanks !!
Yes.. this concept can confuse everyone. What it actually means is, it considers minimum 5 calls to kick off the evaluation. And if the evaluation results in 60% of the calls failed, then the circuit breaker opens. So if 3 out of 5 fails then the circuit breaker opens.
Hi Sir, This vedio is very usefull for learners and in my project i have same requirement to implement circutbreaker. I followed all steps which you are mentioned but it not working. 1. added these all jars resilience4j-reactor,resilience4j-circuitbreaker,resilience4j-core,resilience4j-all,resilience4j-annotations. 2. Added these properties resilience4j.circuitbreaker.instances.cartValidationFromErp.registerHealthIndicator =true resilience4j.circuitbreaker.instances.cartValidationFromErp.failureRateThreshold=50 resilience4j.circuitbreaker.instances.cartValidationFromErp.slidingWindowSize=10 resilience4j.circuitbreaker.instances.cartValidationFromErp.slidingWindowType=COUNT_BASED resilience4j.circuitbreaker.instances.cartValidationFromErp.minimumNumberOfCalls=5 resilience4j.circuitbreaker.instances.cartValidationFromErp.automaticTransitionFromOpenToHalfOpenEnabled=true resilience4j.circuitbreaker.instances.cartValidationFromErp.permittedNumberOfCallsInHalfOpenState=4 resilience4j.circuitbreaker.instances.cartValidationFromErp.waitDurationInOpenState=5s 3.Added @CircuitBreaker(name="cartValidationFromErp") in service class method level With out my above changes response is coming but with above changes response not coming and not throwing any exception.