In Akka Actors (using Scala) one can use supervison strategies to deal with exceptions. This strategy can decide what to do with the actor, depending on the type of exception. From my understanding, there are 4 possibilible outcomes:
- Resume- Let the child actor keep its current state and continue processing new messages like nothing happened.
- Restart - Restart the child actor i.e. kill the current child actor that failed and create a new one in its place.
- Stop - Shut down the child actor permanently.
- Escalate - Let the supervisor’s supervisor handle this error.
The documentation clearly states that upon restarting an actor, the current message will be lost and this has to be dealt with. However, it does not clearly mention if the same applies to resume. Does it continue handling that messages (assuming some external factor caused the exception which isn't there anymore), or does it continue with the next message in the mailbox?