持久的Akka邮箱和无损 [英] Persistent Akka Mailboxes and Losslessness

查看:114
本文介绍了持久的Akka邮箱和无损的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Akka中,当演员在处理消息时死亡(在onReceive(...) { ... }内部,该消息丢失了.有没有办法保证无损?有没有办法将Akka配置为始终在之前保留消息将它们发送到onReceive,以便在演员死后可以对其进行恢复和重播?

In Akka, when an actor dies while processing a message (inside onReceive(...) { ... }, that message is lost. Is there a way to guarantee losslessness? Is there a way to configure Akka to always persist messages before sending them to onReceive, so that they can be recovered and replayed when the actor does die?

也许像一个永久邮箱?

推荐答案

是的,看看

Yes, take a look at Akka Persistence, in particular AtLeastOnceDelivery. This stores messages on the sender side in order to also cover losses during the delivery process, because otherwise the message might not ever reach the destination mailbox.

这篇关于持久的Akka邮箱和无损的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆