circuitBreakerStrategy

Strategy for configuring the processor’s circuit breaker.

The circuit breaker monitors the transient failure rate of the processor and opens the circuit if a configured rate of failures is met. This can help alleviate load on the system in the event of external system downtime by not waiting for timeouts, etc.

The failure/success thresholds for opening and closing the circuit breaker, and the duration it should stay in the open state, can be configured with this strategy.

If this strategy is not provided, the default server configuration is used.

Properties

Name Summary

failureThresholdMinimum

Number of messages out of the given total (i.e., failureThresholdMessageTotal) that must fail in the closed state to decide to open the breaker. If the number of failed messages is lower, the breaker will remain closed. Required and must be less than or equal to the value of failureThresholdMessageTotal.

failureThresholdMessageTotal

Number of messages to include when checking the failure threshold. If the number of messages that have failed within the last failureThresholdMessageTotal is less than failureThresholdMinimum, the breaker will remain closed. Required.

successThresholdMinimum

Number of messages out of the given total (i.e., successThresholdMessageTotal) that must be successful in the half-open state to decide to close the breaker. If the number of successful messages is lower, the breaker is opened again. Required and must be less than or equal to the value of successThresholdMessageTotal.

successThresholdMessageTotal

Number of messages to sample in the half-open state, and to compare to the minimum number of successes (i.e., successThresholdMinimum), to decide whether to open or close the circuit breaker. Required and must be less than or equal to the value of successThresholdMinimum.

halfOpenDelayMillis

The period to keep the breaker open before changing to the half-open state. Required.