I'm using Play 2.1.1 and in application.conf
I add the following custom dispatcher:
# 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
}
}
}
}
I try to use it on an actor:
private val default = Akka.system.actorOf(Props[MessageRouterActor].withRouter(FromConfig()).withDispatcher("rr-dispatcher"), "msgRouter")
But I get this message stating the dispatcher couldn't be found:
[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
As far as I've seen this seems to be the correct way to add it. Anyone knows what's the issue?
You have to put the full config value path: withDispatcher("akka.actor.rr-dispatcher") (or perhaps even "play.akka.actor.rr-dispatcher")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With