ClusterMailboxDepthAgent
このコンテンツはまだ日本語訳がありません。
Defined in: src/cluster/router/MailboxDepthAgent.ts:39
Methods
Section titled “Methods”serve()
Section titled “serve()”
staticserve(cluster): () =>void
Defined in: src/cluster/router/MailboxDepthAgent.ts:60
Serve mailbox depths on cluster until the returned release is called.
A smallest-mailbox ClusterRouter calls this on its own node, which
covers the two common shapes for free — a single node, and the homogeneous
deployment where every node runs both the router and the routees. Call it
yourself on nodes that host routees but no router:
const stopServing = ClusterMailboxDepthAgent.serve(cluster);A node that does not serve simply never reports a depth, and the routers asking it fall back to round-robin order for it — degraded, never broken. Releases are idempotent; releasing twice does not decrement twice.
Parameters
Section titled “Parameters”cluster
Section titled “cluster”Returns
Section titled “Returns”() => void
