NetCoreLabs

round-robin router actor

메시지를 순차분배 처리합니다.

Akka System
RouterActor
WorkActorA1
WorkActorA2
WorkActorA3

Current count: 3

SampleCode
// Create ActorSystem
var actorSystem = akkaService.CreateActorSystem();
// Create RoundRobin Router
var roundrobin = actorSystem.ActorOf(Props.Create<BasicActor>().WithRouter(new RoundRobinPool(0)));
// Create Worker and Add Routee
var workActor = actorSystem.ActorOf(Props.Create<BasicActor>(), NodeName);
var routee = Routee.FromActorRef(workActor);
roundrobin.Tell(new AddRoutee(routee));
// Say Hello 
roundrobin.Tell("Hello");
An unhandled exception has occurred. See browser dev tools for details. Reload 🗙