Configuration Akka.conf调度程序配置是否正常?

Configuration Akka.conf调度程序配置是否正常?,configuration,akka,dispatcher,Configuration,Akka,Dispatcher,我使用的是Akka 2.2-RC1,无法让Akka从application.conf加载dispatcher配置: my-dispatcher { type = PinnedDispatcher executor = "thread-pool-executor" } akka.actor.deployment { /test { dispatcher = my-dispatcher } } 当从以下代码实例化时: val test = system.actorOf(

我使用的是Akka 2.2-RC1,无法让Akka从application.conf加载dispatcher配置:

my-dispatcher {
  type = PinnedDispatcher
  executor = "thread-pool-executor"
}

akka.actor.deployment {
  /test {
    dispatcher = my-dispatcher
  }
}
当从以下代码实例化时:

 val test = system.actorOf(Props[Test], "test")
根据日志,它仍在使用
akka.actor.defaultdispatcher

当我向道具添加
.withDispatcher(“我的dispatcher”)
时,所有道具都正常工作,并且使用了
我的dispatcher
。但我不喜欢将
.withDispatcher(…)
添加到我的所有参与者中的想法

有人知道哪里会有问题吗?我认为actor路径可能是错误的,但aplication.conf路由配置工作正常(自定义路由调度器除外)


经过一些测试,我发现这种效果是由使用
RemoteActorRefProvider
引起的。一旦我禁用它并更改为默认值

akka.actor.provider = "akka.actor.LocalActorRefProvider"
dispatchers正在从配置正确配置


我猜启用远程处理后,Akka会在其他地方寻找参与者调度程序的配置,或者远程引用具有不同的逻辑路径?

这对我来说很好,与您使用的Akka版本相同。我的配置:

test{
  my-dispatcher {
    type = PinnedDispatcher
    executor = "thread-pool-executor"
  }

  akka.actor.deployment {
    /test-actor {
      dispatcher = my-dispatcher
    }
  }
}
我的代码:

object ActorTest{
  def main(args: Array[String]) {
    val conf = ConfigFactory.load()
    val system = ActorSystem("test", conf.getConfig("test"))
    val ref = system.actorOf(Props[TestActor], "test-actor")
  }
}

class TestActor extends Actor{
  def receive = {
    case _ =>
  }
}

我使用了jconsole,并显示固定的调度程序列在Threads选项卡下,感谢您提供的信息,带有“test”子配置,它确实可以工作。但一旦我将dispatcher和deployment configuration移回“root”位置,它就会停止工作。我发现问题是由
akka.remote.RemoteActorRefProvider
引起的,当禁用时,所有配置都正常工作。这听起来像是一个bug,您介意在我们的assembla跟踪器上打开一个票证吗?谢谢@Seigert,你能帮我打开这个bug吗?bug报告在这里: