According to the Akka docs on the System Guardian, if a top-level actor throws an Exception
, it will be restarted indefinitely (with 2 exceptions - no pun intended).
My actor system has 1 and only 1 top-level actor: Initializer
. If Initializer
throws an exception, I would like a different SuervisorStrategy
applied to it, if at all possible:
- Restart
Initializer
up to 3 times - If that doesn't work, then stop/terminate it
How could I implement this custom strategy for the System Guardian?