简体   繁体   English

Akka Spring集成没有设置actor的名字

[英]Akka Spring integration does not set actor's name

I am creating my Akka actors using Akka Spring integration . 我正在使用Akka Spring集成创建我的Akka演员。 The problem is that it seems to create unnamed aactors which is not recommended. 问题是它似乎创建了不推荐的未命名的aactors。 My Akka config is 我的Akka配置是

AkkaDemo{
akka.actor.deployment  {

   /rootActor {
        nr-of-instances = 5   
    }

} }

When I create my actor as 当我创建我的演员时

ActorRef rootActor = system.actorOf(SpringExtProvider.get(system).create("rootActor").withRouter(new RoundRobinPool(5)), "root");

The actor's path is 演员的道路是

akka://AkkaDemo/user/root/$a

Which means that the "rootActor" name is ignored and Akka created an actor with the name $a. 这意味着忽略“rootActor”名称,Akka创建了一个名为$ a的actor。 I am wondering if there is a way to create a named actor via Spring integration? 我想知道是否有办法通过Spring集成创建一个命名演员?

原因是路由器:如果使用.withRouter(...)创建一个actor,则路由器actor接收该actor的名称,并且演员的实例由Akka给出$ .. names

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM