Host name of the MQTT server to connect to.
Network port of the MQTT server to connect to.
Optional
sessionControls how the MQTT5 client should behave with respect to MQTT sessions.
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
minMinimum amount of time to wait to reconnect after a disconnect. Exponential backoff is performed with jitter after each connection failure.
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
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.
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
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
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
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.
Optional
httpConfigures (tunneling) HTTP proxy usage when establishing MQTT connections
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.
Generated using TypeDoc
Configuration options for mqtt5 client creation.