An Akka 2 Terminator

When an Actor stops, its children stop in an undefined order. Child termination is asynchronous and thus non-deterministic.

If an Actor has children that have order dependencies, then you might need to ensure a particular shutdown order of those children so that their postStop() methods get called in the right order. This pattern approaches that problem by introducing an Actor type that we’ll call a Terminator.

Keep reading