JetStreamKeyValueOptionsType
Ce contenu n’est pas encore disponible dans votre langue.
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:17
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).
Extends
Section titled “Extends”Properties
Section titled “Properties”bucket?
Section titled “bucket?”
readonlyoptionalbucket?:string
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:27
Bucket this actor operates on — required.
circuitBreaker?
Section titled “circuitBreaker?”
readonlyoptionalcircuitBreaker?: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.
failureThreshold
Section titled “failureThreshold”
readonlyfailureThreshold:number
resetMs
Section titled “resetMs”
readonlyresetMs:number
Inherited from
Section titled “Inherited from”BrokerCommonOptionsType.circuitBreaker
create?
Section titled “create?”
readonlyoptionalcreate?:boolean
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:51
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 — the right setting when the bucket is provisioned by an
operator and a typo should not silently create an empty one.
history?
Section titled “history?”
readonlyoptionalhistory?:number
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:33
Revisions kept per key. 1 (the JetStream default) keeps only the
current value; a higher history is what makes compare-and-swap and
watch replay useful. Only applied when the actor creates the bucket.
maxValueBytes?
Section titled “maxValueBytes?”
readonlyoptionalmaxValueBytes?:number
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:44
Server-side cap on a single value, in bytes. Only applied on create.
readonlyoptionalname?:string
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:25
Optional client name.
outboundBuffer?
Section titled “outboundBuffer?”
readonlyoptionaloutboundBuffer?: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).
Inherited from
Section titled “Inherited from”BrokerCommonOptionsType.outboundBuffer
password?
Section titled “password?”
readonlyoptionalpassword?:string
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:23
reconnect?
Section titled “reconnect?”
readonlyoptionalreconnect?: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).
Union Members
Section titled “Union Members”false
Type Literal
Section titled “Type Literal”{ factor?: number; initialDelayMs?: number; maxAttempts?: number; maxDelayMs?: number; }
factor?
Section titled “factor?”
readonlyoptionalfactor?:number
initialDelayMs?
Section titled “initialDelayMs?”
readonlyoptionalinitialDelayMs?:number
maxAttempts?
Section titled “maxAttempts?”
readonlyoptionalmaxAttempts?:number
Cap on retry attempts. Default: Infinity (retry forever).
maxDelayMs?
Section titled “maxDelayMs?”
readonlyoptionalmaxDelayMs?:number
Inherited from
Section titled “Inherited from”BrokerCommonOptionsType.reconnect
replicas?
Section titled “replicas?”
readonlyoptionalreplicas?:number
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:42
Replica count. Only applied when the actor creates the bucket.
servers?
Section titled “servers?”
readonlyoptionalservers?:string| readonlystring[]
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:19
NATS server URLs.
storage?
Section titled “storage?”
readonlyoptionalstorage?:"memory"|"file"
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:40
Bucket storage backing. Only applied when the actor creates the bucket.
timeToLive?
Section titled “timeToLive?”
readonlyoptionaltimeToLive?:number
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:38
Per-key time-to-live in milliseconds. Unset = keep forever. Only applied when the actor creates the bucket.
token?
Section titled “token?”
readonlyoptionaltoken?:string
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:21
Optional credentials.
readonlyoptionaluser?:string
Defined in: src/io/broker/JetStreamKeyValueOptions.ts:22
