MqttActorSettings
Defined in: src/io/broker/MqttActor.ts:68
Common settings 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”brokerUrl?
Section titled “brokerUrl?”
readonlyoptionalbrokerUrl?:string
Defined in: src/io/broker/MqttActor.ts:70
Broker URL — mqtt://, mqtts://, ws://, wss://.
circuitBreaker?
Section titled “circuitBreaker?”
readonlyoptionalcircuitBreaker?:object
Defined in: src/io/broker/BrokerSettings.ts:28
Optional circuit-breaker around connectImpl. 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”BrokerCommonSettings.circuitBreaker
cleanSession?
Section titled “cleanSession?”
readonlyoptionalcleanSession?:boolean
Defined in: src/io/broker/MqttActor.ts:81
Clean-session flag. Default true.
clientId?
Section titled “clientId?”
readonlyoptionalclientId?:string
Defined in: src/io/broker/MqttActor.ts:72
Stable client id. When omitted the broker assigns one.
credentials?
Section titled “credentials?”
readonlyoptionalcredentials?:MqttCredentials
Defined in: src/io/broker/MqttActor.ts:73
defaultQos?
Section titled “defaultQos?”
readonlyoptionaldefaultQos?:MqttQos
Defined in: src/io/broker/MqttActor.ts:75
Default QoS used by publish / subscribe when not overridden per call.
keepAliveSec?
Section titled “keepAliveSec?”
readonlyoptionalkeepAliveSec?:number
Defined in: src/io/broker/MqttActor.ts:83
Keep-alive interval in seconds. Default 60.
outboundBuffer?
Section titled “outboundBuffer?”
readonlyoptionaloutboundBuffer?:number
Defined in: src/io/broker/BrokerSettings.ts:41
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”BrokerCommonSettings.outboundBuffer
protocolVersion?
Section titled “protocolVersion?”
readonlyoptionalprotocolVersion?:4|5
Defined in: src/io/broker/MqttActor.ts:92
MQTT protocol version negotiated with the broker. Default 4
(MQTT 3.1.1) for back-compat with every existing config; set to
5 to opt in to MQTT 5.0 features (user properties + reason
codes — see MqttPublish.userProperties +
MqttMessage.reasonCode). The peer-dep mqtt handles
the wire negotiation; we only flip the flag.
reconnect?
Section titled “reconnect?”
readonlyoptionalreconnect?:false| {factor?:number;initialDelayMs?:number;maxAttempts?:number;maxDelayMs?:number; }
Defined in: src/io/broker/BrokerSettings.ts:15
Reconnect strategy applied when the underlying connection drops or
connectImpl 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”BrokerCommonSettings.reconnect
subscriptions?
Section titled “subscriptions?”
readonlyoptionalsubscriptions?: readonlyMqttSubscription[]
Defined in: src/io/broker/MqttActor.ts:77
Initial subscriptions wired up immediately after connect.
readonlyoptionalwill?:object
Defined in: src/io/broker/MqttActor.ts:79
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