Interface ConsumerAPI

interface ConsumerAPI {
    add(stream, cfg): Promise<ConsumerInfo>;
    delete(stream, consumer): Promise<boolean>;
    info(stream, consumer): Promise<ConsumerInfo>;
    list(stream): Lister<ConsumerInfo>;
    pause(stream, name, until?): Promise<{
        pause_until?: string;
        paused: boolean;
    }>;
    resume(stream, name): Promise<{
        pause_until?: string;
        paused: boolean;
    }>;
    update(stream, durable, cfg): Promise<ConsumerInfo>;
}

Methods

  • Adds a new consumer to the specified stream with the specified consumer options.

    Parameters

    Returns Promise<ConsumerInfo>

  • Deletes the specified consumer name/durable from the specified stream.

    Parameters

    • stream: string
    • consumer: string

    Returns Promise<boolean>

  • Returns the ConsumerInfo for the specified consumer in the specified stream.

    Parameters

    • stream: string
    • consumer: string

    Returns Promise<ConsumerInfo>

  • Lists all the consumers on the specfied streams

    Parameters

    • stream: string

    Returns Lister<ConsumerInfo>

  • Parameters

    • stream: string
    • name: string
    • Optional until: Date

    Returns Promise<{
        pause_until?: string;
        paused: boolean;
    }>

  • Parameters

    • stream: string
    • name: string

    Returns Promise<{
        pause_until?: string;
        paused: boolean;
    }>

  • Updates the consumer configuration for the specified consumer on the specified stream that has the specified durable name.

    Parameters

    Returns Promise<ConsumerInfo>