ClusteredRedisQueue.destroy() method
Destroys every server's queue — closing their connections and removing their event listeners — and unregisters this cluster from all configured cluster managers.
Signature:
destroy(): Promise<void>;
Returns:
Promise<void>
Remarks
Unregistering shuts a manager down entirely once it has no clusters left, which for UDPClusterManager also terminates its shared UDP worker.
Routing membership and remembered subscriptions are cleared synchronously, so queued subscription work cannot reopen a destroyed host. Teardown does not wait for the subscription chain; concurrent callers await the same teardown, including manager removal. Every independent cleanup is attempted; failures are reported together in an AggregateError. A later destroy() retries only failed tasks; successful tasks are not repeated. Membership admission stays closed, including during retries. The instance must not be reused.
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.