Class CircuitBreakerProxy$

  • public class CircuitBreakerProxy$
    extends java.lang.Object
    Use akka.pattern.CircuitBreaker + ask instead. Since 2.5.0.
    Creates an circuit breaker actor proxying a target actor intended for request-reply interactions. It is possible to send messages through this proxy without expecting a response wrapping them into a CircuitBreakerProxy.TellOnly or a CircuitBreakerProxy.Passthrough the difference between the two being that a message wrapped into a CircuitBreakerProxy.Passthrough is going to be forwarded even when the circuit is open (e.g. if you need to terminate the target and proxy actors sending a PoisonPill message)

    The circuit breaker implements the same state machine documented in CircuitBreaker

    param: target the actor to proxy param: maxFailures maximum number of failures before opening the circuit param: callTimeout timeout before considering the ongoing call a failure param: resetTimeout time after which the channel will be closed after entering the open state param: circuitEventListener an actor that will receive a series of messages of type CircuitBreakerProxy.CircuitBreakerEvent (optional) param: failureDetector function to detect if a message received from the target actor as a response from the request represents a failure param: failureMap function to map a failure into a response message. The failing response message is wrapped into a CircuitBreakerProxy.CircuitOpenFailure object

    • Field Detail

      • MODULE$

        public static final CircuitBreakerProxy$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • CircuitBreakerProxy$

        public CircuitBreakerProxy$()