Hey all,
According to the docs, failures can be bubbled up through the hierarchy of actors. This is done by simply having the parent actor context.watch the child actorRef, and then _not_ handling the Terminated signal when that child dies. This, in turn, will cause the parent actor to fail with a DeathPactException.
Behaviors spawned with the EventSourcedBehavior do not seem to adhere to this rule and silently ignore the Terminated() signals (or at least: don't cause a DeathPactException as is the case with "regular" typed behavior) when they are not handled in the signalHandler. The signals _do_ reach the signalHandler when I define one myself:
(..)
.receiveSignal {
case (_, Terminated(ref)) => context.log.info("Child [{}] terminated", ref.path) // This gets logged just fine
}
This change in behavior caught me off-guard, and I was wondering if this is simply a bug or undocumented behavior in the EventSourcedBehavior.
All of this is tested with Akka 2.6.0. Cheers!
Thanks for reporting. I think it can be a bug.
Confirming this is seen, working on a fix.
@helena Thanks so much for the quick fix. Looking forward to the next release!