Actor Restart #7417
-
When an actor crashes, it can be in a certain State e.g. state C. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
That is correct - however, persistent actors have the ability to recover their last state by replaying the latest snapshot (optional) and events. This can be used to ensure that the actor reboots into state C, rather than A. You don't necessarily have to have Akka.Persistence to achieve this type of re-entrancy - I'm using some EF Core repositories in one of our legacy applications to allow actors to recover their most recent state and I'm just using a bit of manual behavior-switching to mimic what Akka.Persistence does. But the idea remains the same: give actors the ability to recover their own previous state upon restart under their own power, without relying on external messaging to do so. |
Beta Was this translation helpful? Give feedback.
That is correct - however, persistent actors have the ability to recover their last state by replaying the latest snapshot (optional) and events. This can be used to ensure that the actor reboots into state C, rather than A.
You don't necessarily have to have Akka.Persistence to achieve this type of re-entrancy - I'm using some EF Core repositories in one of our legacy applications to allow actors to recover their most recent state and I'm just using a bit of manual behavior-switching to mimic what Akka.Persistence does. But the idea remains the same: give actors the ability to recover their own previous state up…