O'Reilly logo

Akka Essentials by Munish K. Gupta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lifecycle monitoring

Besides 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required