error-kernel

Handling Faults in Akka actors

与世无争的帅哥 提交于 2019-12-04 11:05:38
问题 I've a very simple example where I've an Actor ( SimpleActor ) that perform a periodic task by sending a message to itself. The message is scheduled in the constructor for the actor. In the normal case (i.e., without faults) everything works fine. But what if the Actor has to deal with faults. I've another Actor ( SimpleActorWithFault ). This actor could have faults. In this case, I'm generating one myself by throwing an exception. When a fault happens (i.e., SimpleActorWithFault throws an