Type Alias StreamUpdateConfig

StreamUpdateConfig: {
    allow_direct: boolean;
    allow_rollup_hdrs: boolean;
    compression?: StoreCompression;
    consumer_limits?: StreamConsumerLimits;
    deny_delete: boolean;
    deny_purge: boolean;
    description?: string;
    discard: DiscardPolicy;
    discard_new_per_subject: boolean;
    duplicate_window: Nanos;
    max_age: Nanos;
    max_bytes: number;
    max_msg_size: number;
    max_msgs: number;
    max_msgs_per_subject: number;
    metadata?: Record<string, string>;
    mirror_direct: boolean;
    no_ack?: boolean;
    num_replicas: number;
    placement?: Placement;
    republish?: Republish;
    sources?: StreamSource[];
    subject_transform?: SubjectTransformConfig;
    subjects: string[];
}

Stream options that can be updated

Type declaration

  • allow_direct: boolean

    Allow higher performance, direct access to get individual messages via the $JS.DS.GET API

  • allow_rollup_hdrs: boolean

    Allows the use of the JsHeaders#RollupHdr header to replace all contents of a stream, or subject in a stream, with a single new message

  • Optionalcompression?: StoreCompression

    Sets the compression level of the stream. This feature is only supported in servers 2.10.x and better.

  • Optionalconsumer_limits?: StreamConsumerLimits

    The consumer limits applied to consumers that don't specify limits for inactive_threshold or max_ack_pending. Note that these limits become an upper bound for all clients.

  • deny_delete: boolean

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

  • deny_purge: boolean

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

  • Optionaldescription?: string

    A short description of the purpose of this stream

  • discard: DiscardPolicy

    When a Stream reach its limits either old messages are deleted or new ones are denied

  • discard_new_per_subject: boolean

    Sets the context of the on a per subject basis. Requires DiscardPolicy#New as the discard policy.

  • duplicate_window: Nanos

    The time window to track duplicate messages for, expressed in nanoseconds. 0 for default Set JetStreamPublishOptions#msgID to enable duplicate detection.

  • max_age: Nanos

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

  • max_bytes: number

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

  • max_msg_size: number

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

  • max_msgs: number

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

  • max_msgs_per_subject: number

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

  • Optionalmetadata?: Record<string, string>

    Metadata field to store additional information about the stream. Note that keys starting with _nats are reserved. This feature only supported on servers 2.10.x and better.

  • mirror_direct: boolean

    Allow higher performance, direct access to get individual messages via the $JS.DS.GET API

  • Optionalno_ack?: boolean

    Disables acknowledging messages that are received by the Stream.

  • num_replicas: number

    How many replicas to keep for each message. Min 1, Max 5. Default 1.

  • Optionalplacement?: Placement

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

  • Optionalrepublish?: Republish

    Rules for republishing messages from a stream with subject mapping onto new subjects for partitioning and more

  • Optionalsources?: StreamSource[]

    List of Stream names to replicate into this Stream

  • Optionalsubject_transform?: SubjectTransformConfig

    Apply a subject transform to incoming messages before doing anything else. This feature only supported on 2.10.x and better.

  • subjects: string[]

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