This content originally appeared on DEV Community and was authored by Maxime Guilbert
During some tests, we found some errors related to our implementation of the Circuit Breaker with Resilience4J. So we wanted to disable it and continue our tests.
But we never found a property in the Resilience4J documentation which allow it!
Maybe we missed something, so do you know if there is a property to do it?
Alternate solution
But when we red the documentation, we saw some properties which can help to reduce the Circuit Breaker activation.
failureRateThreshold: 100
minimumNumberOfCalls: 100
slidingWindowSize: 100
waitDurationInOpenState: 1
- failureRateThreshold : The minimum rate of failures to activate the Circuit Breaker
- minimumNumberOfCalls : The minimum number of calls before starting calculating the rate
- slidingWindowSize : The number of last calls used to calculate the failure rate
- waitDurationInOpenState : In milliseconds, the duration of the Circuit Breaker activation
By taking a high number of calls and a high rate, the Circuit Breaker will less be activated. And with a small duration of the Circuit Breaker, normally any transactions should be stopped.
Be careful, this solution is just to reduce the activation of the Circuit Breaker, it won't disable it. So if you have a huge number of transactions per second, may be it won't be enough.
Also, I never tested to have a high number for slidingWindowSize, so maybe it can have an impact on your transaction duration. The value 100 is the default value and it can be enough in a lot of cases.
Links
- Resilience4J documentation : https://resilience4j.readme.io/docs/circuitbreaker
I hope it will help you!
This content originally appeared on DEV Community and was authored by Maxime Guilbert
Maxime Guilbert | Sciencx (2021-06-29T17:03:44+00:00) How to disable Resilience4J?. Retrieved from https://www.scien.cx/2021/06/29/how-to-disable-resilience4j/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.