MqttOptionsType
이 콘텐츠는 아직 번역되지 않았습니다.
Defined in: src/io/broker/MqttOptions.ts:39
Plain options-object shape accepted by an MqttActor.
Extends
Section titled “Extends”Properties
Section titled “Properties”brokerUrl?
Section titled “brokerUrl?”
readonlyoptionalbrokerUrl?:string
Defined in: src/io/broker/MqttOptions.ts:41
Broker URL — mqtt://, mqtts://, ws://, wss://.
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
cleanSession?
Section titled “cleanSession?”
readonlyoptionalcleanSession?:boolean
Defined in: src/io/broker/MqttOptions.ts:50
Clean-session flag. Default true.
clientId?
Section titled “clientId?”
readonlyoptionalclientId?:string
Defined in: src/io/broker/MqttOptions.ts:43
Stable client id. When omitted the broker assigns one.
codec?
Section titled “codec?”
readonlyoptionalcodec?:MqttCodec<unknown>
Defined in: src/io/broker/MqttOptions.ts:65
Payload codec used by MqttPayload.entity (inbound decode) and
by publish when handed a non-string/non-Uint8Array entity.
Default: mqttJsonCodec. One codec per actor.
credentials?
Section titled “credentials?”
readonlyoptionalcredentials?:MqttCredentials
Defined in: src/io/broker/MqttOptions.ts:44
keepAlive?
Section titled “keepAlive?”
readonlyoptionalkeepAlive?:number
Defined in: src/io/broker/MqttOptions.ts:52
Keep-alive interval in seconds. Default 60.
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
protocolVersion?
Section titled “protocolVersion?”
readonlyoptionalprotocolVersion?:4|5
Defined in: src/io/broker/MqttOptions.ts:59
MQTT protocol version negotiated with the broker. Default 4
(MQTT 3.1.1); set to 5 to opt in to MQTT 5.0 features (user
properties + reason codes — see MqttPublish.userProperties
readonlyoptionalqos?:MqttQos
Defined in: src/io/broker/MqttOptions.ts:46
Default QoS used by publish / subscribe when not overridden per call.
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
readonlyoptionalwill?:object
Defined in: src/io/broker/MqttOptions.ts:48
Last-will-and-testament published by the broker if the actor disconnects ungracefully.
payload
Section titled “payload”
readonlypayload:string|Uint8Array<ArrayBufferLike>
readonlyoptionalqos?:MqttQos
retain?
Section titled “retain?”
readonlyoptionalretain?:boolean
readonlytopic:string
