method RedisBackplane.prototype.connect
RedisBackplane.prototype.connect(): Promise<void>

Builds the client pair when needed, then subscribes.

Idempotent and safe to call concurrently: the open is memoized, so two overlapping calls join one attempt rather than each building — and leaking — its own pair of connections. A failed attempt leaves the instance unconnected with any connection it created already quit, and clears the memo so a later call retries. A close() arriving mid-attempt wins: the attempt retires whatever it built rather than publishing it.

Return Type

Promise<void>

Throws

Error

Whatever the module load, connection construction, or SUBSCRIBE rejected with

Usage

import { RedisBackplane } from "realtime-backplane-plugin/src/index.ts";