Akka docs say to configure
akka.actor.guardian-supervisor-strategy
, which takes the fully-qualified class-name of aSupervisorStrategyConfigurator
SupervisorStrategyConfigurator is a trait. Do I need to extend any classes with my subclassed trait? Or do I just define the trait and specify it in the configs, causing Akka to generate the guardian actor with that trait?
The default value of
akka.actor.guardian-supervisor-strategy
is"akka.actor.DefaultSupervisorStrategy"
(It is also default for any actor created without a specific supervisorStrategy). There are two known subclasses ofSupervisorStrategyConfigurator
(DefaultSupervisorStrategy
andStoppingSupervisorStrategy
). You can see the source code here.If you want a custom one you need to extend
SupervisorStrategyConfigurator
and specify in the config file. An example for configuration: