Skip to content

Actor Restart #7417

Answered by Aaronontheweb
HermansG asked this question in Q&A
Dec 19, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

When the actor is restarted, it will be back in its default state A. True?

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…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@HermansG
Comment options

@Aaronontheweb
Comment options

Answer selected by HermansG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants