@nats-io/jetstream
    Preparing search index...

    Type Alias Stream

    type Stream = {
        name: string;
        alternates(): Promise<StreamAlternate[]>;
        best(): Promise<Stream>;
        deleteMessage(seq: number, erase?: boolean): Promise<boolean>;
        getConsumer(
            name?: string | Partial<OrderedConsumerOptions>,
        ): Promise<Consumer>;
        getMessage(query: MsgRequest): Promise<StoredMsg>;
        getPushConsumer(
            stream: string,
            name?: string | Partial<OrderedPushConsumerOptions>,
        ): Promise<PushConsumer>;
        info(
            cached?: boolean,
            opts?: Partial<StreamInfoRequestOptions>,
        ): Promise<StreamInfo>;
        resetConsumer(name: string, seq?: number): Promise<ConsumerResetResponse>;
    }
    Index

    Properties

    name: string

    Methods

    • Returns a list of streams that are equivalent alternates to this one.

      Returns Promise<StreamAlternate[]>

    • Return the alternate (best RRT) for this stream. This is the first alternate returned by the server.

      Returns Promise<Stream>

    • Deletes the specified message sequence

      Parameters

      • seq: number
      • Optionalerase: boolean

        default is true

      Returns Promise<boolean>

    • Returns the named consumer pull consumer. If instead of a name an OrderedConsumerOptions configuration is passed, an ordered pull consumer is created and returned.

      Parameters

      Returns Promise<Consumer>

    • Retrieves the specified message using the specified query.

      Parameters

      Returns Promise<StoredMsg>

    • Resets the named consumer's delivery state. See ConsumerAPI.reset for the underlying behavior, version requirements, and policy constraints.

      IMPORTANT: this is an admin operation. In-flight consume(), fetch(), next(), or push subscriptions on the consumer are NOT coordinated by this call. Buffered messages from the prior delivery may still be yielded, and re-delivered messages will have a delivery sequence restarting from 1 — looking like a gap. Ordered consumers detect the gap and recreate themselves; non-ordered consumers should be stopped and restarted by the caller after a reset.

      Parameters

      • name: string

        consumer name or durable

      • Optionalseq: number

        optional stream sequence to reset to

      Returns Promise<ConsumerResetResponse>