Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
interface ConsumerAPI
import { type ConsumerAPI } from "https://deno.land/x/natsws@v1.28.0/src/mod.ts";

Methods

info(stream: string, consumer: string): Promise<ConsumerInfo>

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

add(stream: string, cfg: Partial<ConsumerConfig>): Promise<ConsumerInfo>

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

update(
stream: string,
durable: string,
cfg: Partial<ConsumerUpdateConfig>,
): Promise<ConsumerInfo>

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

delete(stream: string, consumer: string): Promise<boolean>

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

list(stream: string): Lister<ConsumerInfo>

Lists all the consumers on the specfied streams

pause(
stream: string,
name: string,
until?: Date,
): Promise<{ paused: boolean; pause_until?: string; }>
resume(stream: string, name: string): Promise<{ paused: boolean; pause_until?: string; }>