NetCoreLabs

broad-casr router actor

메시지를 전체발송 처리합니다.

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