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:
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?
Does 'resume' keep current message?
No.
The "what happens to the message" section of the documentation describes the behavior when an exception is thrown while an actor is processing a message:
What happens to the message
If an exception is thrown while a message is being processed (i.e. taken out of its mailbox and handed over to the current behavior), then this message will be lost. It is important to understand that it is not put back on the mailbox. So if you want to retry processing of a message, you need to deal with it yourself by catching the exception and retry your flow. Make sure that you put a bound on the number of retries since you don’t want a system to livelock (so consuming a lot of cpu cycles without making progress).
The above behavior applies to any of the supervision strategies: resume, restart, or stop. ("Escalate" is a fourth strategy in classic Akka but is not explicitly supported in Akka Typed. However, escalation can be emulated in Akka Typed.)