edgeport - v1.0.6
    Preparing search index...

    Interface RedisMessage

    A message delivered to a RedisSubscription.

    1.0.6

    interface RedisMessage {
        channel: string;
        pattern?: string;
        payload: Uint8Array;
        json<T = unknown>(): T;
        text(): string;
    }
    Index
    channel: string

    The channel the message was published to.

    pattern?: string

    The pattern that matched, for a RedisSession.psubscribe delivery.

    payload: Uint8Array

    The raw payload bytes.

    • Decodes the payload as UTF-8 then parses it as JSON.

      Type Parameters

      • T = unknown

        The expected shape of the decoded value.

      Returns T

      The parsed value.

      If the payload is not valid JSON.

    • Decodes the payload as UTF-8 text.

      Returns string

      The payload as a string.