Optional
connackTime interval to wait after sending a CONNECT request for a CONNACK to arrive. If one does not arrive, the connection will be shut down.
Optional
connectAll configurable options with respect to the CONNECT packet sent by the client, including the will. These connect properties will be used for every connection attempt made by the client.
Host name of the MQTT server to connect to.
Optional
maxMaximum amount of time to wait to reconnect after a disconnect. Exponential backoff is performed with jitter after each connection failure.
Optional
minAmount of time that must elapse with an established connection before the reconnect delay is reset to the minimum. This helps alleviate bandwidth-waste in fast reconnect cycles due to permission failures on operations.
Optional
minMinimum amount of time to wait to reconnect after a disconnect. Exponential backoff is performed with jitter after each connection failure.
Network port of the MQTT server to connect to.
Optional
retryControls how the reconnect delay is modified in order to smooth out the distribution of reconnection attempt timepoints for a large set of reconnecting clients.
Optional
sessionControls how the MQTT5 client should behave with respect to MQTT sessions.
Optional
topicAdditional controls for client behavior with respect to topic alias usage.
If this setting is left undefined, then topic aliasing behavior will be disabled.
Optional
ackTime interval to wait for an ack after sending a QoS 1+ PUBLISH, SUBSCRIBE, or UNSUBSCRIBE before failing the operation.
Optional
clientClient bootstrap to use. In almost all cases, this can be left undefined.
Optional
extendedAdditional controls for client behavior with respect to operation validation and flow control; these checks go beyond the base MQTT5 spec to respect limits of specific MQTT brokers.
Optional
httpConfigures (tunneling) HTTP proxy usage when establishing MQTT connections
Optional
offlineControls how disconnects affect the queued and in-progress operations tracked by the client. Also controls how new operations are handled while the client is not connected. In particular, if the client is not connected, then any operation that would be failed on disconnect (according to these rules) will also be rejected.
Optional
pingTime interval to wait after sending a PINGREQ for a PINGRESP to arrive. If one does not arrive, the client will close the current connection.
Optional
socketControls socket properties of the underlying MQTT connections made by the client. Leave undefined to use defaults (no TCP keep alive, 10 second socket timeout).
Optional
tlsTLS context for secure socket connections. If undefined, then a plaintext connection will be used.
Optional
websocketThis callback allows a custom transformation of the HTTP request that acts as the websocket handshake. Websockets will be used if this is set to a valid transformation callback. To use websockets but not perform a transformation, just set this as a trivial completion callback. If undefined, the connection will be made with direct MQTT.
Generated using TypeDoc
Configuration options for mqtt5 client creation.