In my Akka system there is a top-level ("root") actor, Initializer
, from which all other actors come from. There is also an actor, Destroyer
, that is responsible for shutting down the system gracefully when it receives a Destroy
message. There are several conditions under which an actor would send a Destroy
to the Destroyer
, but those don't really matter here.
I would now like to implement functionality in Initializer
's SupervisorStrategy
where, if it can't handle a failure/exception thrown by one of its chidren, it will interpret that as a "stop the world"-type event, and shut the system down gracefully.
My knee jerk reaction is to have Initializer
escalate the failure, but I'm not sure what happens when the top-most actor escalates. It would be nice if there was a way for that escalation to somehow invoke the Desroyer
, but not sure how to wire that all up. Any ideas?