Skip to content

ClusterRouterOptions

Defined in: src/cluster/router/ClusterRouter.ts:66

TMsg

readonly cluster: Cluster

Defined in: src/cluster/router/ClusterRouter.ts:68

The cluster the router lives in. Used for membership + transport.


readonly optional extractKey?: (message) => string

Defined in: src/cluster/router/ClusterRouter.ts:86

Required for routerType: 'consistent-hashing', ignored otherwise. Returns the string key used to pin a message to a routee. Two messages with the same key always land on the same node (subject to the cluster topology not changing).

TMsg

string


readonly optional role?: string

Defined in: src/cluster/router/ClusterRouter.ts:70

Restrict routees to up-members carrying this role. Omit for “any node”.


readonly routeePath: string

Defined in: src/cluster/router/ClusterRouter.ts:79

The path the routee actor lives under on each routee node — usually /user/<actorName>. The same path must exist on every targeted node; the router doesn’t probe for liveness beyond the cluster membership state.


readonly routerType: ClusterRouterType

Defined in: src/cluster/router/ClusterRouter.ts:72

Strategy. See ClusterRouterType.