Apparently, you are using futures inside the actor, as you mention context.dispatcherand context.system.dispatcher. Note that these two parameters are not necessarily the same (but they are usually the same):
context.system.dispatcher - .context.dispatcher - , , .
ExecutionContext , :
, , (, ), context.dispatcher.
, "" , context.dispatcher (, , ), , , , . , - :
implicit val executionContext: ExecutionContext =
context.system.dispatchers.lookup("my-blocking-dispatcher")
my-blocking-dispatcher application.conf. :
my-blocking-dispatcher {
type = Dispatcher
executor = "thread-pool-executor"
thread-pool-executor {
fixed-pool-size = 10
}
throughput = 1
}
, - Akka. ,
implicit val ec = ExecutionContext.fromExecutor(Executors.newFixedThreadPool(10))
, , context.dispatcher . , , .