Re-starting a panicked Actor from a supervisor? #115
-
Is there any chance there might be some documentation that I've missed on how to re-start a panicked Actor once the supervisor is notified it has failed using the I'm primarily just interested in dealing with a case where I've written an |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
So actor's can't be restarted, the cleanup routine fully tears down the input and output ports. It need to be re-created, which you will need to manage if you want to do something like state recovery or something. Depending on how the actor died, the state may be unrecoverable or corrupted so it can't be assumed that a restart is safe. You would simple start a new instance of the actor with |
Beta Was this translation helpful? Give feedback.
So actor's can't be restarted, the cleanup routine fully tears down the input and output ports. It need to be re-created, which you will need to manage if you want to do something like state recovery or something. Depending on how the actor died, the state may be unrecoverable or corrupted so it can't be assumed that a restart is safe.
You would simple start a new instance of the actor with
spawn_linked
against the supervisor. The child that dead will have been automatically removed from the supervision tree during the drop cleanup.