如果 actor 失败,连接到远程 actor 的邮箱会发生什么

What happens to mailbox attached to a remote actor if actor fails

如果远程 actor 死亡,父 actor 会收到通知,但是连接到远程 actor 的邮箱会发生什么情况? 如果没有办法检索它那我们怎么说akka是容错的?

一种方法是实施 Akka Persistence:

By default, a persistent actor is automatically recovered on start and on restart by replaying journaled messages. New messages sent to a persistent actor during recovery do not interfere with replayed messages. New messages will only be received by a persistent actor after recovery completes. http://doc.akka.io/docs/akka/2.4.4/java/lambda-persistence.html#Recovery

您还可以确保您向其发送消息的远程 actor 是生成 actor 来处理远程请求的主管。这样,工作和失败就包含在这些子项中,而不是您的主要远程 actor 接收器。