Packages

object CircuitBreakerProxy

This is an Actor which implements the circuit breaker pattern, you may also be interested in the raw circuit breaker akka.pattern.CircuitBreaker

Annotations
@deprecated
Deprecated

(Since version 2.5.0) Use akka.pattern.CircuitBreaker + ask instead

Source
CircuitBreakerProxy.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CircuitBreakerProxy
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait CircuitBreakerCommand extends AnyRef
  2. sealed trait CircuitBreakerEvent extends AnyRef
  3. final case class CircuitBreakerPropsBuilder(maxFailures: Int, callTimeout: Timeout, resetTimeout: Timeout, circuitEventListener: Option[ActorRef] = None, failureDetector: (Any) ⇒ Boolean = _ ⇒ false, openCircuitFailureConverter: (CircuitOpenFailure) ⇒ Any = identity) extends Product with Serializable
  4. sealed trait CircuitBreakerResponse extends AnyRef
  5. sealed trait CircuitBreakerState extends AnyRef
  6. final case class CircuitBreakerStateData(failureCount: Int = 0, firstHalfOpenMessageSent: Boolean = false) extends Product with Serializable
  7. final case class CircuitClosed(circuit: ActorRef) extends CircuitBreakerCommand with Product with Serializable
  8. final case class CircuitHalfOpen(circuit: ActorRef) extends CircuitBreakerCommand with Product with Serializable
  9. final case class CircuitOpen(circuit: ActorRef) extends CircuitBreakerCommand with Product with Serializable
  10. final case class CircuitOpenFailure(failedMsg: Any) extends Product with Serializable
  11. final case class Passthrough(msg: Any) extends CircuitBreakerCommand with Product with Serializable
  12. final case class TellOnly(msg: Any) extends CircuitBreakerCommand with Product with Serializable

Value Members

  1. def props(target: ActorRef, maxFailures: Int, callTimeout: Timeout, resetTimeout: Timeout, circuitEventListener: Option[ActorRef], failureDetector: (Any) ⇒ Boolean, failureMap: (CircuitOpenFailure) ⇒ Any): Props

    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

    target

    the actor to proxy

    maxFailures

    maximum number of failures before opening the circuit

    callTimeout

    timeout before considering the ongoing call a failure

    resetTimeout

    time after which the channel will be closed after entering the open state

    circuitEventListener

    an actor that will receive a series of messages of type akka.contrib.circuitbreaker.CircuitBreakerProxy.CircuitBreakerEvent (optional)

    failureDetector

    function to detect if a message received from the target actor as a response from the request represents a failure

    failureMap

    function to map a failure into a response message. The failing response message is wrapped into a akka.contrib.circuitbreaker.CircuitBreakerProxy.CircuitOpenFailure object

  2. object Closed extends CircuitBreakerState with Product with Serializable
  3. object HalfOpen extends CircuitBreakerState with Product with Serializable
  4. object Open extends CircuitBreakerState with Product with Serializable