NetCoreLabs

round-robin router actor

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

Akka System
RouterActor
WorkActorA1
WorkActorA2
WorkActorA3
WorkActorA4
WorkActorA5
WorkActorA6
WorkActorA7
WorkActorA8
WorkActorA9
WorkActorA10
WorkActorA11
WorkActorA12

Current count: 12

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 🗙