akka参与者/路由器的调度程序

akka参与者/路由器的调度程序,akka,Akka,我有以下配置 akka{ actor { deployment{ /my-router { dispatcher = akka.actor.my-dispatcher router = round-robin-pool nr-of-instances = 100 cluster { enabled = on max-nr-of

我有以下配置

akka{
  actor {

    deployment{
       /my-router {
           dispatcher = akka.actor.my-dispatcher
           router = round-robin-pool
           nr-of-instances = 100
           cluster {
              enabled = on
              max-nr-of-instances-per-node = 30
           }
       }         
    }

    my-dispatcher {
       type = Dispatcher
       executor = "fork-join-executor"
       fork-join-executor {
           parallelism-min = 4
           parallelism-factor = 2.0
           parallelism-max = 20
       }
   }
  }
}

我发现(在visualVM的帮助下)没有使用
my dispatcher
的线程。但是,如果我通过
.withDispatcher(“akka.actor.my dispatcher”)
指定
我的dispatcher
,当我通过FromConfig为我的路由器创建道具时,我可以观察到这些线程。我可以声明我观察了这些线程,因为我看到的线程的名称如下:
actorSystemName akka.actor.my-dispatcher-8

因此,问题是:

  • 如何通过配置为路由器设置调度程序

  • 该调度器是否将用于路由对象(显然是路由器的孩子)

  • 通过config指定dispatcher与通过withDispatcher指定dispatcher有什么区别

  • 我还尝试在
    中围绕config的dispatcher设置,但仍然没有观察到visualVM中具有dispatcher名称的线程,所以线程的名称是否具有这样的模式
    {actorsystemname}-{dispatcher}-{number}

  • 编辑 我发现,
    pool dispatcher
    属性可用于为子级(路由对象)设置路由器的dispatcher。但是扩展
    Pool
    FromConfig
    缺少对
    usePoolDispatcher
    方法的重写。所以还有一个问题:这是有意的(
    usepooldpatcher
    FromConfig
    中未被覆盖),还是
    FromConfig
    不是为这种用途而设计的