Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
interface StreamState
import { type StreamState } from "https://deno.land/x/natsws@v1.28.0/src/mod.ts";

Properties

messages: number

Number of messages stored in the Stream

bytes: number

Combined size of all messages in the Stream

first_seq: number

Sequence number of the first message in the Stream

first_ts: string

The ISO timestamp of the first message in the Stream

last_seq: number

Sequence number of the last message in the Stream

last_ts: string

The ISO timestamp of the last message in the Stream

num_deleted: number

The number of deleted messages

deleted: number[]

IDs of messages that were deleted using the Message Delete API or Interest based streams removing messages out of order StreamInfoRequestOptions | deleted_details is specified on the request.

Messages that were damaged and unrecoverable

consumer_count: number

Number of Consumers attached to the Stream

optional
num_subjects: number

The number of unique subjects held in the stream

optional
subjects: Record<string, number>

Subjects and their message counts when a StreamInfoRequestOptions | subjects_filter was set