How to disable Resilience4J?

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…


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

I hope it will help you!


This content originally appeared on DEV Community and was authored by Maxime Guilbert


Print Share Comment Cite Upload Translate Updates
APA

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/

MLA
" » How to disable Resilience4J?." Maxime Guilbert | Sciencx - Tuesday June 29, 2021, https://www.scien.cx/2021/06/29/how-to-disable-resilience4j/
HARVARD
Maxime Guilbert | Sciencx Tuesday June 29, 2021 » How to disable Resilience4J?., viewed ,<https://www.scien.cx/2021/06/29/how-to-disable-resilience4j/>
VANCOUVER
Maxime Guilbert | Sciencx - » How to disable Resilience4J?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/06/29/how-to-disable-resilience4j/
CHICAGO
" » How to disable Resilience4J?." Maxime Guilbert | Sciencx - Accessed . https://www.scien.cx/2021/06/29/how-to-disable-resilience4j/
IEEE
" » How to disable Resilience4J?." Maxime Guilbert | Sciencx [Online]. Available: https://www.scien.cx/2021/06/29/how-to-disable-resilience4j/. [Accessed: ]
rf:citation
» How to disable Resilience4J? | Maxime Guilbert | Sciencx | 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.

You must be logged in to translate posts. Please log in or register.