我正在使用Play 2.1.1,在application.conf
中我添加了以下自定义分发器:
# Dispatcher for round-robin actors
play {
akka {
actor {
rr-dispatcher = {
type = BalancingDispatcher
executor = fork-join-executor
fork-join-executor {
parallelism-min = 2
parallelism-factor = 2
parallelism-max = 24
}
# messages per actor before jumping
throughput = 100
}
}
}
}
我尝试在演员上使用它:
private val default = Akka.system.actorOf(Props[MessageRouterActor].withRouter(FromConfig()).withDispatcher("rr-dispatcher"), "msgRouter")
但是我收到了这个消息,提示找不到调度程序:
[info] play - Starting application default Akka system.
[WARN] [04/20/2013 22:05:12.069] [application-akka.actor.default-dispatcher-5] [Dispatchers] Dispatcher [rr-dispatcher] not configured, using default-dispatcher
据我所见,这似乎是添加它的正确方式。有人知道问题出在哪里吗?