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

NatsOptionsBuilder

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

Defined in: src/io/broker/NatsOptions.ts:27

new NatsOptionsBuilder(): NatsOptionsBuilder

NatsOptionsBuilder

BrokerOptionsBuilder<NatsOptionsType>.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


withCircuitBreaker(failureThreshold, resetMs): this

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

Circuit breaker around connect attempts.

number

number

this

BrokerOptionsBuilder.withCircuitBreaker


withName(name): this

Defined in: src/io/broker/NatsOptions.ts:59

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/NatsOptions.ts:49

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/NatsOptions.ts:34

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

string | readonly string[]

this


withSubscriptions(subscriptions): this

Defined in: src/io/broker/NatsOptions.ts:54

Subscriptions wired up at connect time.

readonly object[]

this


withToken(token): this

Defined in: src/io/broker/NatsOptions.ts:39

Token credential.

string

this


withUser(user): this

Defined in: src/io/broker/NatsOptions.ts:44

Username credential.

string

this


static create(): NatsOptionsBuilder

Defined in: src/io/broker/NatsOptions.ts:29

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

NatsOptionsBuilder