Class AwsIotMqtt5ClientConfigBuilder

Builder pattern class to create an Mqtt5ClientConfig which can then be used to create an Mqtt5Client, configured for use with AWS IoT.

MQTT5 Client User Guide

Hierarchy

  • AwsIotMqtt5ClientConfigBuilder

Methods

  • Create a new MQTT5 client builder that will create MQTT5 clients that connect to AWS IoT Core via websockets, using AWS Sigv4 signing to establish authenticate.

    Parameters

    • hostName: string

      AWS IoT endpoint to connect to

    • sigv4Config: WebsocketSigv4Config

      additional sigv4-oriented options to use

    Returns AwsIotMqtt5ClientConfigBuilder

  • Overrides 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. Custom authentication configuration will override the username and password values in this configuration.

    Parameters

    • connectPacket: ConnectPacket

      all configurable options with respect to the CONNECT packet sent by the client

    Returns AwsIotMqtt5ClientConfigBuilder

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

    Parameters

    • retryJitterMode: RetryJitterType

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

    Returns AwsIotMqtt5ClientConfigBuilder

  • Overrides the minimum amount of time to wait to reconnect after a disconnect. Exponential backoff is performed with controllable jitter after each connection failure.

    Parameters

    • minReconnectDelayMs: number

      minimum amount of time to wait to reconnect after a disconnect.

    Returns AwsIotMqtt5ClientConfigBuilder

  • Overrides the maximum amount of time to wait to reconnect after a disconnect. Exponential backoff is performed with controllable jitter after each connection failure.

    Parameters

    • maxReconnectDelayMs: number

      maximum amount of time to wait to reconnect after a disconnect.

    Returns AwsIotMqtt5ClientConfigBuilder

  • Overrides the 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.

    Parameters

    • minConnectedTimeToResetReconnectDelayMs: number

      the amount of time that must elapse with an established connection before the reconnect delay is reset to the minimum

    Returns AwsIotMqtt5ClientConfigBuilder

  • Overrides the 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.

    Parameters

    • connectTimeoutMs: number

      overall time interval to wait to establish an MQTT connection

    Returns AwsIotMqtt5ClientConfigBuilder

  • Sets the opaque options set passed through to the underlying websocket implementation regardless of url factory. Use this to control proxy settings amongst other things.

    Parameters

    • options: any

      websocket transport options

    Returns AwsIotMqtt5ClientConfigBuilder

Generated using TypeDoc