Router
constRouter:object
Defined in: src/Router.ts:79
Helpers that return ready-to-spawn Props for pool-style routers. Example: const pool = system.actorOf(Router.roundRobin(5, Props.create(() => new Worker()))); pool.tell(‘work’); pool.tell(new Broadcast(‘announce’));
Type Declaration
Section titled “Type Declaration”broadcast()
Section titled “broadcast()”broadcast<
TMsg>(size,routeeProps):Props<TMsg|Broadcast<TMsg>>
Type Parameters
Section titled “Type Parameters”TMsg
Parameters
Section titled “Parameters”number
routeeProps
Section titled “routeeProps”Props<TMsg>
Returns
Section titled “Returns”custom()
Section titled “custom()”custom<
TMsg>(size,routeeProps,strategy):Props<TMsg|Broadcast<TMsg>>
Type Parameters
Section titled “Type Parameters”TMsg
Parameters
Section titled “Parameters”number
routeeProps
Section titled “routeeProps”Props<TMsg>
strategy
Section titled “strategy”Returns
Section titled “Returns”random()
Section titled “random()”random<
TMsg>(size,routeeProps):Props<TMsg|Broadcast<TMsg>>
Type Parameters
Section titled “Type Parameters”TMsg
Parameters
Section titled “Parameters”number
routeeProps
Section titled “routeeProps”Props<TMsg>
Returns
Section titled “Returns”roundRobin()
Section titled “roundRobin()”roundRobin<
TMsg>(size,routeeProps):Props<TMsg|Broadcast<TMsg>>
Type Parameters
Section titled “Type Parameters”TMsg
Parameters
Section titled “Parameters”number
routeeProps
Section titled “routeeProps”Props<TMsg>