SupervisorStrategy, there is another way to monitor the actor lifecycle. The monitoring strategy provides a mechanism where any actor can listen to certain events on another actor. Based on these events, the listening actor can direct another actor or it can take decisions on how to handle the actor termination. Some of the guidelines when lifecycle monitoring is required are as follows:
- The actor monitoring is usually used when the actors in question are not part of your hierarchy. So actors at the horizontal level are primarily the candidates for monitoring.
- When the supervisor wants to terminate the child actors instead of just restarting (in order to clear the mailbox attached to the actors), monitoring on the actor's ...