Supervisor Strategy Recipes
supervision guides
Supervisor Strategy Recipes Supervisors decide what to do when their children fail. The recipes below build on the core Supervision concepts with practical defaults.
Restart with backoff Restarting too quickly can thrash the system. Apply exponential backoff and give up after repeated failures.
.NET public override SupervisorStrategy SupervisorStrategy => new OneForOneStrategy( maxNrOfRetries: 5, withinTimeRange: TimeSpan.FromSeconds(10), decider: ex => SupervisorDirective.Restart); Go var strategy = actor.NewOneForOneStrategy(5, time.Second*10, func(reason interface{}) actor.Directive { return actor.
Read more...