Supervision options

For supervision, are these the only 2 options?

  1. Modify application.conf and set the value.
    If – (will stop or restart the child actor depending on exception thrown - It will stop the child actor

  2. Create a SupervisorActor, and define the strategy in that class. Then create the child actor from the SupervisorActor which will inherit those characteristics.

The first thing you mention is special though – it is the user guardians supercision strategy. Only applies to actors started by the guardian, i.e. any actors that are /user/hello named-like. Others like /user/hello/child are handled the 2nd way, by their parent.

In general changing the user guardians strategy should not be needed most of the time as you are encouraged to start actors in a deeper hierarchy anyway.

Note that there’s also the Backoff supervision though it’s a separate mechanism, not the usual supervision one. In Akka Typed Actors this one is included in the “main” supervision mechanisms though, so we’re becoming more aligned there.