private RootGuardianActorRef CreateRootGuardian(ActorSystemImpl system)
{
var supervisor = new RootGuardianSupervisor(_rootPath, this, _terminationPromise, _log);
var rootGuardianStrategy = new OneForOneStrategy(ex =>
{
_log.Error(ex, "Guardian failed. Shutting down system");
return Directive.Stop;
});
var props = Props.Create<GuardianActor>(rootGuardianStrategy);
var rootGuardian = new RootGuardianActorRef(system, props, DefaultDispatcher, _defaultMailbox, supervisor, _rootPath, _deadLetters, _extraNames);
return rootGuardian;
}