在使用Akka角色模型时,我对akka.conf配置文件有一些不理解的地方(对于Java,但对于Scala必须是相同的)。
例如,使用远程模块时:
我有时会看到这样的东西:
akka {
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
remote {有时:
akka {
actor {
provider = remote
}
remote {首先,key provider的期望值是多少?有时是类名,有时只是remote,顺便问一下,考虑到remote在akka命名空间下,为什么它是remote而不是akka.remote?
发布于 2020-07-07 01:04:42
从reference.conf (撰写本答案时的当前From ):
akka.actor {
# Either one of "local", "remote" or "cluster" or the
# FQCN of the ActorRefProvider to be used; the below is the built-in default,
# note that "remote" and "cluster" requires the akka-remote and akka-cluster
# artifacts to be on the classpath.
provider = "local"akka.actor.provider是一个在启动时解释的字符串。这种解释是通过构造一个ProviderSelection (参见here)来实现的。如果提供了完全限定的类名,则使用该名称。cluster、local (默认来自reference.conf)和remote分别是akka.cluster.ClusterActorRefProvider、akka.actor.LocalActorRefProvider和akka.remote.RemoteActorRefProvider的同义词。
https://stackoverflow.com/questions/62758609
复制相似问题