我想用分散聚集模式构建actor链
我的流程如下:
a1=>a2=>a3=>a4=>a5
当我创建actor时,我使用以下代码:
val a5: ActorRef = actorSystem.actorOf(Props(new A5))
val a4: ActorRef = actorSystem.actorOf(Props(new A4(a5, otherArgs4))
val a3: ActorRef = actorSystem.actorOf(Props(new A3(a4, otherArgs3)))
val a2: ActorRef = actorSystem.actorOf(Props(new A2(a3)))
val a1: ActorRef = actorSystem.actorOf(Props(new A1(a2)))
我可以用更智能,更可配置的方式创建演员链吗?