Interface Mqtt5ClientConfig

Configuration options for mqtt5 client creation.

Hierarchy

  • Mqtt5ClientConfig

Properties

connectProperties?: ConnectPacket

All 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.

connectTimeoutMs?: number

Overall time interval to wait to establish an MQTT connection. If a complete MQTT connection (from socket establishment all the way up to CONNACK receipt) has not been established before this timeout expires, the connection attempt will be considered a failure.

hostName: string

Host name of the MQTT server to connect to.

maxReconnectDelayMs?: number

Maximum amount of time to wait to reconnect after a disconnect. Exponential backoff is performed with jitter after each connection failure.

minConnectedTimeToResetReconnectDelayMs?: number

Amount 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.

minReconnectDelayMs?: number

Minimum amount of time to wait to reconnect after a disconnect. Exponential backoff is performed with jitter after each connection failure.

port: number

Network port of the MQTT server to connect to.

retryJitterMode?: RetryJitterType

Controls how the reconnect delay is modified in order to smooth out the distribution of reconnection attempt timepoints for a large set of reconnecting clients.

sessionBehavior?: ClientSessionBehavior

Controls how the MQTT5 client should behave with respect to MQTT sessions.

topicAliasingOptions?: TopicAliasingOptions

Additional controls for client behavior with respect to topic alias usage.

If this setting is left undefined, then topic aliasing behavior will be disabled.

Browser-only

websocketOptions?: Mqtt5WebsocketConfig

Options for the underlying websocket connection

Generated using TypeDoc