Creates an circuit breaker actor proxying a target actor intended for request-reply interactions.
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 akka.contrib.circuitbreaker.CircuitBreakerProxy.TellOnly or a akka.contrib.circuitbreaker.CircuitBreakerProxy.Passthrough the difference between the two being that a message wrapped into a akka.contrib.circuitbreaker.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 akka.actor.PoisonPill message)
The circuit breaker implements the same state machine documented in akka.pattern.CircuitBreaker
the actor to proxy
maximum number of failures before opening the circuit
timeout before considering the ongoing call a failure
time after which the channel will be closed after entering the open state
an actor that will receive a series of messages of type akka.contrib.circuitbreaker.CircuitBreakerProxy.CircuitBreakerEvent (optional)
function to detect if a message received from the target actor as a response from the request represents a failure
function to map a failure into a response message. The failing response message is wrapped into a akka.contrib.circuitbreaker.CircuitBreakerProxy.CircuitOpenFailure object
This is an Actor which implements the circuit breaker pattern, you may also be interested in the raw circuit breaker akka.pattern.CircuitBreaker
(Since version 2.5.0) Use akka.pattern.CircuitBreaker + ask instead