跳转到内容
简体中文

JetStreamObjectStoreOptionsType

此内容尚不支持你的语言。

Defined in: src/io/broker/JetStreamObjectStoreOptions.ts:21

Common options every broker actor accepts on top of its protocol- specific options. Subclasses extend this interface with their own required fields (e.g. brokerUrl, topics).

readonly optional bucket?: string

Defined in: src/io/broker/JetStreamObjectStoreOptions.ts:31

Bucket this actor operates on — required.


readonly optional circuitBreaker?: object

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

Optional circuit-breaker around connectImplementation. After failureThreshold consecutive failed connect attempts the breaker opens for resetMs and rejects new attempts immediately.

readonly failureThreshold: number

readonly resetMs: number

BrokerCommonOptionsType.circuitBreaker


readonly optional create?: boolean

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

Create the bucket at connect time when it does not exist. Default true. false binds to an existing bucket and fails the connect if it is missing.


readonly optional description?: string

Defined in: src/io/broker/JetStreamObjectStoreOptions.ts:33

Human-readable bucket description. Only applied on create.


readonly optional maxObjectBytes?: number

Defined in: src/io/broker/JetStreamObjectStoreOptions.ts:47

Largest object body this actor will move, in bytes. Default 1 MiB.

It is a real limit, not a hint: a put above it is rejected before the body reaches the bounded outbound buffer, and a get above it is refused before the body is materialised. Raise it only as far as outboundBuffer × maxObjectBytes stays a resident-memory figure you are willing to hold while disconnected.


readonly optional name?: string

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

Optional client name.


readonly optional outboundBuffer?: number

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

Maximum number of outbound messages buffered while the connection is connecting or disconnected. When the buffer is full the oldest message is dropped (FIFO eviction) and a BrokerBufferOverflow event is published. Default: 1000. Set to 0 to fail-fast (publish a BrokerNotConnected event and drop the message).

BrokerCommonOptionsType.outboundBuffer


readonly optional password?: string

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


readonly optional reconnect?: false | { factor?: number; initialDelayMs?: number; maxAttempts?: number; maxDelayMs?: number; }

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

Reconnect strategy applied when the underlying connection drops or connectImplementation throws. Default: exponential backoff starting at 200ms, doubling, capped at 30s, infinite attempts. Set to false to disable auto-reconnect (one-shot connections).

false


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

readonly optional factor?: number

readonly optional initialDelayMs?: number

readonly optional maxAttempts?: number

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

readonly optional maxDelayMs?: number

BrokerCommonOptionsType.reconnect


readonly optional replicas?: number

Defined in: src/io/broker/JetStreamObjectStoreOptions.ts:37

Replica count. Only applied when the actor creates the bucket.


readonly optional servers?: string | readonly string[]

Defined in: src/io/broker/JetStreamObjectStoreOptions.ts:23

NATS server URLs.


readonly optional storage?: "memory" | "file"

Defined in: src/io/broker/JetStreamObjectStoreOptions.ts:35

Bucket storage backing. Only applied when the actor creates the bucket.


readonly optional token?: string

Defined in: src/io/broker/JetStreamObjectStoreOptions.ts:25

Optional credentials.


readonly optional user?: string

Defined in: src/io/broker/JetStreamObjectStoreOptions.ts:26