0
Mein System mit Play Framework 2.5 und Akka Build-in laufen. Ich glaube, es gibt zwei Möglichkeiten, einen Router zu initalisieren.Unterschied zwischen zwei Wege zu init Akka Router
1:
ActorRef router = akkaService.getActorSystem()
.actorOf(new RoundRobinPool(poolSize)
.props(Props.create(ProfileActor.class)), "ProfileActor");
2:
ActorRef router = akkaService.getActorSystem()
.actorOf(new Props(ProfileActor.class)
.withRouter(new RoundRobinRouter(poolSize)), "ProfileActor"));
So habe ich 2 Fragen:
- Sind sie anders?
- Welcher Weg ist besser?
Vielen Dank!