Table of Contents

Class StreamConfig

Namespace
NATS.Client.JetStream.Models
Assembly
NATS.Client.JetStream.dll
public record StreamConfig : IEquatable<StreamConfig>
Inheritance
StreamConfig
Implements
Inherited Members

Constructors

StreamConfig(string, ICollection<string>)

Properties

AllowDirect

Allow higher performance, direct access to get individual messages

AllowRollupHdrs

Allows the use of the Nats-Rollup header to replace all contents of a stream, or subject in a stream, with a single new message

Compression

Optional compression algorithm used for the Stream.

DenyDelete

Restricts the ability to delete messages from a stream via the API. Cannot be changed once set to true

DenyPurge

Restricts the ability to purge messages from a stream via the API. Cannot be change once set to true

Description

A short description of the purpose of this stream

Discard

When a Stream reach it's limits either old messages are deleted or new ones are denied

DiscardNewPerSubject

When discard policy is new and the stream is one with max messages per subject set, this will apply the new behavior to every subject. Essentially turning discard new from maximum number of subjects into maximum number of messages in a subject.

DuplicateWindow

The time window to track duplicate messages for, expressed in nanoseconds. 0 for default

MaxAge

Maximum age of any message in the stream, expressed in nanoseconds. 0 for unlimited.

MaxBytes

How big the Stream may be, when the combined stream size exceeds this old messages are removed. -1 for unlimited.

MaxConsumers

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

MaxMsgSize

The largest message that will be accepted by the Stream. -1 for unlimited.

MaxMsgs

How many messages may be in a Stream, oldest messages will be removed if the Stream exceeds this size. -1 for unlimited.

MaxMsgsPerSubject

For wildcard streams ensure that for every unique subject this many messages are kept - a per subject retention limit

Metadata

Additional metadata for the Stream

Mirror

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

MirrorDirect

Allow higher performance, direct access for mirrors as well

Name

A unique name for the Stream, empty for Stream Templates.

NoAck

Disables acknowledging messages that are received by the Stream.

NumReplicas

How many replicas to keep for each message.

Placement

Placement directives to consider when placing replicas of this stream, random placement when unset

Republish
Retention

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

Sealed

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

Sources

List of Stream names to replicate into this Stream

Storage

The storage backend to use for the Stream.

SubjectTransform

Subject transform to apply to matching messages

Subjects

A list of subjects to consume, supports wildcards. Must be empty when a mirror is configured. May be empty when sources are configured.

TemplateOwner

When the Stream is managed by a Stream Template this identifies the template that manages the Stream.