edgeport - v1.0.3
    Preparing search index...

    Interface PullConsumer

    A bound durable pull consumer; call fetch to pull batches of messages.

    Re-binding the same (stream, durable) from a fresh connection resumes the same server-side cursor, so only un-acked messages are redelivered (see JsMessage).

    1.0.0

    interface PullConsumer {
        durable: string;
        stream: string;
        fetch(batch: number, opts?: FetchOptions): Promise<JsMessage[]>;
    }
    Index
    durable: string

    The durable name that identifies this consumer across connections.

    stream: string

    The stream this consumer reads from.

    • Pulls up to batch messages, returning as soon as any arrive or the server expiry elapses.

      Parameters

      • batch: number

        The maximum number of messages to pull.

      • Optionalopts: FetchOptions

        Optional server-side expiry for the pull.

      Returns Promise<JsMessage[]>

      The messages pulled (empty if none were available before expiry); each must be JsMessage.ack'd to prevent redelivery.

      If the connection is closed.