コンテンツにスキップ
日本語

JetStreamOptionsBuilder

このコンテンツはまだ日本語訳がありません。

Defined in: src/io/broker/JetStreamOptions.ts:41

new JetStreamOptionsBuilder(): JetStreamOptionsBuilder

JetStreamOptionsBuilder

BrokerOptionsBuilder<JetStreamOptionsType>.constructor

build(): Partial<T>

Defined in: src/util/OptionsBuilder.ts:51

Snapshot the set fields as an independent Partial<T> (own props only).

Partial<T>

BrokerOptionsBuilder.build


withAcknowledgmentTimeout(ms): this

Defined in: src/io/broker/JetStreamOptions.ts:88

Max time the manual-ack pump waits for ack/nak/term before giving up.

number

this


withCircuitBreaker(failureThreshold, resetMs): this

Defined in: src/io/broker/BrokerOptions.ts:125

Circuit breaker around connect attempts.

number

number

this

BrokerOptionsBuilder.withCircuitBreaker


withConsumer(consumer): this

Defined in: src/io/broker/JetStreamOptions.ts:78

Consumer config — required to start a subscription.

JetStreamConsumerConfig

this


withName(name): this

Defined in: src/io/broker/JetStreamOptions.ts:68

Client name reported to the server.

string

this


withOutboundBuffer(limit): this

Defined in: src/io/broker/BrokerOptions.ts:130

Outbound buffer size (messages held while disconnected). Default 1000; 0 = fail-fast.

number

this

BrokerOptionsBuilder.withOutboundBuffer


withPassword(password): this

Defined in: src/io/broker/JetStreamOptions.ts:63

Password credential.

string

this


withReconnect(policy): this

Defined in: src/io/broker/BrokerOptions.ts:120

Reconnect policy (or false to disable auto-reconnect).

false | { factor?: number; initialDelayMs?: number; maxAttempts?: number; maxDelayMs?: number; } | undefined

false


{ factor?: number; initialDelayMs?: number; maxAttempts?: number; maxDelayMs?: number; }

number

number

number

Cap on retry attempts. Default: Infinity (retry forever).

number


undefined

this

BrokerOptionsBuilder.withReconnect


withServers(servers): this

Defined in: src/io/broker/JetStreamOptions.ts:48

NATS server URLs ('nats://localhost:4222' or array).

string | readonly string[]

this


withStream(stream): this

Defined in: src/io/broker/JetStreamOptions.ts:73

Stream lifecycle config — set when this actor owns the stream.

JetStreamStreamConfig

this


withTarget(target): this

Defined in: src/io/broker/JetStreamOptions.ts:83

Actor receiving every consumed message.

ActorRef<JetStreamMessage>

this


withToken(token): this

Defined in: src/io/broker/JetStreamOptions.ts:53

Token credential.

string

this


withUser(user): this

Defined in: src/io/broker/JetStreamOptions.ts:58

Username credential.

string

this


static create(): JetStreamOptionsBuilder

Defined in: src/io/broker/JetStreamOptions.ts:43

Start a fresh builder. Equivalent to new JetStreamOptionsBuilder().

JetStreamOptionsBuilder