Configures a back-off supervisor actor.
Back-off supervisor that stops and starts a child actor using a back-off algorithm when the child actor stops.
Back-off supervisor that stops and starts a child actor using a back-off algorithm when the child actor stops.
This back-off supervisor is created by using akka.pattern.BackoffSupervisor.props
with Backoff.onStop
.
Builds back-off options for creating a back-off supervisor.
Builds back-off options for creating a back-off supervisor.
You can pass BackoffOptions
to akka.pattern.BackoffSupervisor.props
.
An example of creating back-off options:
Backoff.onFailure(childProps, childName, minBackoff, maxBackoff, randomFactor) .withManualReset .withSupervisorStrategy( OneforOneStrategy(){ case e: GivingUpException => Stop case e: RetryableException => Restart } )
Configures a back-off supervisor actor. Start with
Backoff.onStop
orBackoff.onFailure
. BackoffOptions is immutable, so be sure to chain methods like:val options = Backoff.onFailure(childProps, childName, minBackoff, maxBackoff, randomFactor) .withManualReset context.actorOf(BackoffSupervisor.props(options), name)