I have a scenario where I create actors on demand. I want to be able to define a Dispatcher
and attach it to my actor programmatically.
The deal is: My ActorSystem
is already running, which mean that it have already loaded all the Akka
configurations.
Seems like the Dispatcher
has to be defined in the application.conf
before creating the ActorSystem
, so I have two questions:
Is there anyway to add new
Akka
configuration to anActorSystem
after it has been started?Is there another way to use
Props[MyActor].withDispatcher("any-dispatcher")
without theDispatcher
being defined in theActorSystem
configuration?