You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having a hard time setting up some of the circuit breaker options. In particular, the following keys are documented, but not what type the values should be. In particular, I don't know what the value should be for the following:
:delay-ms
:failure-threshold
:failure-threshold-ratio
:success-threshold
:success-threshold-ratio
:on-open
:on-close
:on-half-open
I assume that :on-open, :on-close, :on-half-open should be functions of artity 0.
There options are available when creating circuit breaker in defcircuitbreaker.
Failure criteria
All the three fail options share same meaning with similar option in
retry block.
:fail-if
:fail-on
:fail-when
:timeout-ms while give all you code a timeout is best practice in
application level, circuit breaker also provides a timeout for
marking a long running block as failure
Delay and threshold
:delay-ms required. the delay for :open circuit breaker to turn
into :half-open.
:failure-threshold
:failure-threshold-ratio
:success-threshold
:success-threshold-ratio All these four option is to determine at
what condition the circuit breaker is open.
Listeners
:on-open a function to be called when state goes :open
:on-close a function to be called when state goes :closed
:on-half-open a function to be called when state goes :half-open
First of all, thank you for diehard 🙏
I'm having a hard time setting up some of the circuit breaker options. In particular, the following keys are documented, but not what type the values should be. In particular, I don't know what the value should be for the following:
:delay-ms
:failure-threshold
:failure-threshold-ratio
:success-threshold
:success-threshold-ratio
:on-open
:on-close
:on-half-open
I assume that
:on-open
,:on-close
,:on-half-open
should be functions of artity 0.Diehard docs: https://cljdoc.org/d/diehard/diehard/0.8.5/api/diehard.core#defcircuitbreaker
Failsafe docs: https://jodah.net/failsafe/circuit-breaker/#event-listeners
The text was updated successfully, but these errors were encountered: