Setu-TS
    Preparing search index...

    Interface RedisBackplaneOptions

    Options for the 'redis' arm — Redis pub/sub.

    0.2.0

    interface RedisBackplaneOptions {
        client?: IRedisBackplaneClient;
        commandTimeoutMs?: number;
        connectionErrorReporter?: ConnectionErrorReporter;
        diagnostics?: RealtimeDiagnosticsOptions;
        localNotice?: boolean;
        module?: IRedisModule;
        onHandlerError?: (error: unknown, frame: RealtimeFrame) => void;
        origin?: string;
        subscriber?: IRedisBackplaneClient;
        topic?: string;
        transport: "redis";
        url?: string;
    }

    Hierarchy (View Summary)

    Index

    The publishing client. Must be supplied together with RedisBackplaneOptions.subscriber: a Redis connection in subscriber mode refuses every other command, so one connection cannot do both jobs.

    commandTimeoutMs?: number

    Bounds every command on the two connections this transport builds, in milliseconds, through the ioredis commandTimeout option. Defaults to DEFAULT_REDIS_COMMAND_TIMEOUT_MS; 0 disables the bound.

    Without it, a connection that stays open while the server stops answering (a paused or partitioned host that sends no reset) never settles a publish: the caller's promise hangs, the WebSocket and SSE consumers never log the failure, and an observed publish is never recorded. A disconnected server is unaffected — ioredis already rejects its queued commands when maxRetriesPerRequest exhausts (about 10 s on its default backoff), which is below the default, so a short partition is still buffered and delivered late.

    Read only on the lazy ioredis path: an injected client / subscriber pair keeps whatever timeout it was constructed with.

    At construction, when not a number from 0 to 2147483647 — above that, the runtime's timer overflows to 1 ms and every command would time out almost at once

    0.8.0

    connectionErrorReporter?: ConnectionErrorReporter

    Receives the connection errors (ioredis 'error' events) of the two connections this transport BUILDS, instead of ioredis printing each reconnect failure to the console. Defaults, through RealtimeBackplanePlugin, to one backed by the application's logger; supply your own to route them elsewhere.

    Read only on the lazy ioredis path: an injected client / subscriber pair belongs to the caller and gets no listener, since one would silence the caller's own 'error' handling.

    0.8.0

    Opt-in realtime lifecycle observations for the local diagnostics connector (M98l). Absent (the default) registers an inert disabled source and observes nothing. Not available on the 'custom' arm: an application-supplied transport is never observed.

    When set, the plugin counts, under the one approved alias, how many publications resolved or rejected (and how long the last took) and how many arriving frames reached the local handlers, after the transport's own shape and origin filters. Publication completion is transport completion, never delivery to a peer. No frame, room or channel name, payload or origin is ever observed. Validated when RealtimeBackplanePlugin(...) is called.

    0.8.0

    localNotice?: boolean

    M70n X3-4: when the resolved transport is 'memory', the plugin logs a process-local notice at register() — frames fan out only within this process, which looks like partial delivery behind more than one replica. Default true; false suppresses the notice, matching the existing scalingNotice opt-out shape on the SSE and WebSocket plugins.

    0.2.0

    module?: IRedisModule

    A module exposing an ioredis-compatible constructor, for testing.

    onHandlerError?: (error: unknown, frame: RealtimeFrame) => void

    Receives every subscriber throw or rejection instead of default logging. Hook failures are swallowed; the bounded handlerErrors history is retained.

    0.11.0

    origin?: string

    This instance's identity, stamped on published frames so a subscriber can drop its own echoes. Defaults to a fresh runtime.uuid(), which is correct for every deployment; override only to make a test deterministic.

    The dedicated subscriber client.

    topic?: string

    The broker topic / Redis channel every instance publishes and subscribes on. Defaults to 'setu-ts.realtime'. Instances must agree on it to see each other.

    transport: "redis"

    Transport discriminant.

    url?: string

    Connection URL used to build both clients on the lazy ioredis path. Read only when no clients are injected.