Stopping actors

Once the actors have processed the messages, it may be imperative to stop them. Stopping of actors may be required because we have created a large number of actors and now the load has come down, so we can stop some to conserve resources. In this section, we will see the various options available to stop actors.

Stopping actors

Actor termination involves multiple steps. Once the STOP signal is received by the actor, the following actions take place:

  1. Actor stops processing the mailbox messages.
  2. Actor sends the STOP signal to all the children.
  3. Actor waits for termination message from all its children.
  4. Next, Actor starts the self-termination process that ...

Get Akka Essentials now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.