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

Properties

name: string

A unique name for the Stream

retention: RetentionPolicy

How messages are retained in the Stream, once this is exceeded old messages are removed.

storage: StorageType

The storage backend to use for the Stream.

max_consumers: number

How many Consumers can be defined for a given Stream. -1 for unlimited.

optional
mirror: StreamSource

Maintains a 1:1 mirror of another stream with name matching this property. When a mirror is configured subjects and sources must be empty.

sealed: boolean

Sealed streams do not allow messages to be deleted via limits or API, sealed streams can not be unsealed via configuration update. Can only be set on already created streams via the Update API

first_seq: number

Sets the first sequence number used by the stream. This property can only be specified when creating the stream, and likely is not valid on mirrors etc., as it may disrupt the synchronization logic.