如何更改 Guardian Actor 的默认 Supervisor Strategy Decider?
How to change the Guardian Actor's default Supervisor Strategy Decider?
是否可以更改监护人的监督策略以更改其默认 "Decider" 设置。例如,它目前通过停止子 actor 来处理 ActorKilledExceptions。我们如何才能改变它处理这些异常的方式(即在遇到这些异常时重新启动)?
引用 docs:
Since Akka 2.1 it is possible to configure this using the setting
akka.actor.guardian-supervisor-strategy
, which takes the
fully-qualified class-name of a SupervisorStrategyConfigurator
.
在参考配置中,恰好是这样的
guardian-supervisor-strategy = "akka.actor.DefaultSupervisorStrategy"
它可以更改为您可能创建的 akka.actor.SupervisorStrategyConfigurator
的任何子类。
是否可以更改监护人的监督策略以更改其默认 "Decider" 设置。例如,它目前通过停止子 actor 来处理 ActorKilledExceptions。我们如何才能改变它处理这些异常的方式(即在遇到这些异常时重新启动)?
引用 docs:
Since Akka 2.1 it is possible to configure this using the setting
akka.actor.guardian-supervisor-strategy
, which takes the fully-qualified class-name of aSupervisorStrategyConfigurator
.
在参考配置中,恰好是这样的
guardian-supervisor-strategy = "akka.actor.DefaultSupervisorStrategy"
它可以更改为您可能创建的 akka.actor.SupervisorStrategyConfigurator
的任何子类。