I'm using Akka 2.2-RC1 and I'm not able to get Akka to load dispatcher configuration from application.conf:
my-dispatcher {
type = PinnedDispatcher
executor = "thread-pool-executor"
}
akka.actor.deployment {
/test {
dispatcher = my-dispatcher
}
}
When instantiated from code like
val test = system.actorOf(Props[Test], "test")
by logs it is still using akka.actor.default-dispatcher
.
When I'm adding .withDispatcher("my-dispatcher")
to Props all is working properly and my-dispatcher
is used. But I do not like idea of adding .withDispatcher(...)
to all my actors...
Do anyone know where could be a problem? I was thinking that actor path may be wrong, but apllication.conf routing configuration works properly (with exception of custom routee dispatcher, again).
After some testing I've found that this effect is caused by use of RemoteActorRefProvider
. As soon as I disabled it and changed to default
akka.actor.provider = "akka.actor.LocalActorRefProvider"
dispatchers were configuring from config properly.
I guess with remoting enabled Akka looks elsewhere for configuration of actor dispatchers or maybe remote refs have different logical paths?