UDPClusterManager class
Cluster manager that discovers redis cluster members from UDP broadcast announcements. Supply instances through IMQOptions.clusterManagers.
Signature:
export declare class UDPClusterManager extends ClusterManager
Extends: ClusterManager
Remarks
It runs a supervised worker thread holding the broadcast socket and applies each announcement to every registered cluster, skipping servers that are already known. Managers created with the same broadcast settings share one socket and worker thread, reference-counted so the worker lives until the last of them is destroyed; the logger and handleSignals options are not part of that identity. If the worker dies unexpectedly it is logged and re-spawned after one second with all live managers re-attached, so membership tracking resumes on its own.
Announcements are not filtered by queue name: every cluster registered with a manager listening on a given address and port receives every server announced there. Isolate unrelated services by giving them distinct broadcast addresses or ports.
Wire format — each announcement is one UDP datagram containing five tab-separated fields: queue name, unique server id, up or down, host:port, and the liveness timeout in seconds. Datagrams with a missing field, a port outside 1-65535, or a negative timeout are ignored. An up announcement adds the server and refreshes its liveness deadline; a down announcement removes it immediately.
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Creates the manager and starts listening for broadcasts immediately, joining an existing worker when another manager already uses the same broadcast settings. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Stops this manager and releases its share of the broadcast worker. |
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.