作为本地和远程参与者之间的事件

Akka events between local and remote actors

在同一个 ActorSystem 中的 actor 之间使用事件总线机制很简单,但我想知道在以下之间是否有这样做的认可方法:

假设我知道通往演员的路径很好,但如果有一种常用的机制也能发现这些东西,我很想听听。

我认为在这种情况下,您需要在集群上寻找分布式发布-订阅,假设您想要订阅参与者事件,而不知道参与者的位置。这 link 可能会有用。

这是来自 official Akka documentation 的注释:

The event stream is a local facility, meaning that it will not distribute events to other nodes in a clustered environment (unless you subscribe a Remote Actor to the stream explicitly). If you need to broadcast events in an Akka cluster, without knowing your recipients explicitly (i.e. obtaining their ActorRefs), you may want to look into: Distributed Publish Subscribe in Cluster.