edgeport - v1.0.6
    Preparing search index...

    Interface RedisSubscription

    An active subscription that yields RedisMessages as they arrive.

    Iterate it with for await; the loop ends when unsubscribe is called or the connection closes. It is an AsyncDisposable, so await using unsubscribes automatically.

    1.0.6

    interface RedisSubscription {
        channels: readonly string[];
        pattern: boolean;
        "[asyncDispose]"(): PromiseLike<void>;
        "[asyncIterator]"(): AsyncIterator<RedisMessage, any, any>;
        unsubscribe(): Promise<void>;
    }

    Hierarchy

    • AsyncIterable<RedisMessage>
    • AsyncDisposable
      • RedisSubscription
    Index
    channels: readonly string[]

    The channels (or patterns) this subscription covers.

    pattern: boolean

    Whether the entries in channels are patterns rather than exact channel names.

    • Returns PromiseLike<void>

    • Returns AsyncIterator<RedisMessage, any, any>

    • Stops the subscription and ends the iterator.

      Only the channels no other subscription still holds are unsubscribed on the server.

      Returns Promise<void>

      Resolves once the server confirms.