Setu-TS
    Preparing search index...

    Interface NatsOptions

    NATS-specific options (internal use).

    0.1.0

    interface NatsOptions {
        client?: INatsConnection;
        defaultQueue?: string;
        headersFactory?: () => INatsHeaders;
        logger?: { error: (msg: string) => void };
        publishTimeoutMs?: number;
        reconnect?: { maxAttempts?: number; waitMs?: number };
        streamName?: string;
        streamSubjects?: readonly string[];
        url?: string;
    }
    Index
    client?: INatsConnection

    Injected NATS connection.

    defaultQueue?: string

    Shared queue-less group prefix; the group is <defaultQueue>.<topic>. A newly created group starts at new messages; later subscribers resume it.

    'messaging-consumers'
    
    headersFactory?: () => INatsHeaders

    Factory for NATS headers when an application injects the connection.

    logger?: { error: (msg: string) => void }

    Optional logger for error reporting.

    publishTimeoutMs?: number

    Publish acknowledgement bound in ms, from 0 through 2147483647. Zero disables the bound; an expired publish may still be delivered. Consumer reads are unaffected.

    15000
    

    0.11.0

    reconnect?: { maxAttempts?: number; waitMs?: number }

    Lazy connection reconnect policy. Defaults: maxAttempts -1 (forever), waitMs 2000. maxAttempts must be an integer >= -1; waitMs an integer 1–2147483647. Invalid values throw RangeError at construction; an injected client with this option throws TypeError. Exhausting a finite budget closes the connection and health stays down.

    0.10.0

    streamName?: string

    JetStream stream name (default: 'MESSAGING').

    streamSubjects?: readonly string[]

    Subjects the broker may create the stream with when it is absent (X28-2). No default: with the stream absent and this unset, connect() throws JetStreamStreamError naming both remedies. See NatsMessagingOptions.streamSubjects for the full behavior.

    0.5.0

    url?: string

    NATS connection URL(s).