我想将 Akka 配置为使用带有 redis 持久邮箱的远程参与者,如下所示。
common.conf 文件:
akka {
actor {
mailbox {
redis {
hostname = "127.0.0.1"
port = 6379
}
}
provider = "akka.remote.RemoteActorRefProvider" }
remote {netty {hostname = "127.0.0.1" }}
}
和我的 application.conf 文件:
calculatorActor {include "common"}
remotecreation {
include "common"
akka {
actor {
deployment {
/advancedCalculator {
router = "round-robin"
nr-of-instances = 200
target {
nodes = ["akka://CalculatorApplication@127.0.0.1:2552"]
}
}
}
}
remote.netty.port = 2554
}
}
这是从 akka-sample-remote 派生的配置。当我运行应用程序时,我看不到任何与 redis 端(持久邮箱!)的连接。Redis 日志仅包含:
0 clients connected (0 slaves)