When a persistent, typed actor fails during recovery (for example because a breaking change in the serialization format), it throws a JournalFailureException.
I’m watching this actor from another one and get the Terminated signal but its failure is set to None so there is no way to determine if the actor stopped because of the journal failure or in a normal way.
The exception is thrown here:
which is then captured by a supervisor behavior here:
which logs the exception and stops the actor.
Is this behavior intentional? I could not find a way to customize the behavior so it propagates the failure to the watchers.
I just found this more than 2 years old question while I am struggeling with the same problem. I just converted a classic event source actor to the new typed API. I found no way to report a Journal write failure to the parent actor.
While I understand the reasoning behind the Akka implementation - the user shall not be able to resume an EventSourcedBehavior on a JournalFailureException - it would good to have a kind of “hook” to somehow notify the failure to other actors that might be interested in it.
Wouldn’t be a signal WriteJournalFailed a good solution?