Returns the configured MqttConnectionConfig. On the first invocation of this function, the TLS context is cached and re-used on all subsequent calls to build().
The configured MqttConnectionConfig
Overrides the default system trust store.
Buffer containing all trust CAs, in PEM format
Overrides the default system trust store.
Only used on Unix-style systems where all trust anchors are stored in a directory (e.g. /etc/ssl/certs).
Single file containing all trust CAs, in PEM format
Determines whether or not the service should try to resume prior subscriptions, if it has any
true if the session should drop prior subscriptions when this client connects, false to resume the session
Configures the client_id to use to connect to the IoT Core service
The client id for this connection. Needs to be unique across all devices/clients.
Configures AWS credentials (usually from Cognito) for this connection
The service region to connect to
IAM Access ID
IAM Secret Key
STS token from Cognito (optional)
Configures the IoT endpoint for this connection
The IoT endpoint to connect to
Configure the http proxy options to use to establish the connection
proxy options to use to establish the mqtt connection
Configures MQTT keep-alive via PING messages. Note that this is not TCP keepalive.
How often in seconds to send an MQTT PING message to the service to keep the connection alive
Configures the PINGREQ response timeout (in milliseconds)
PINGREQ response timeout
The port to connect to on the IoT endpoint
The port to connect to on the IoT endpoint. Usually 8883 for MQTT, or 443 for websockets
Configures the protocol operation timeout (in milliseconds)
protocol operation timeout
Configures the common settings for the socket to use when opening a connection to the server
The socket settings
Configures the TCP socket timeout (in milliseconds)
TCP socket timeout
Configures the will message to be sent when this client disconnects
The will topic, qos, and message
Create a new builder with mTLS cert pair in memory
Certificate, in PEM format
Private key, in PEM format
Create a new builder with mTLS file paths
Path to certificate, in PEM format
Path to private key, in PEM format
Create a new builder with mTLS using a PKCS#11 library for private key operations.
NOTE: This configuration only works on Unix devices.
PKCS#11 options.
Create a new builder with mTLS using a certificate in a Windows certificate store.
NOTE: This configuration only works on Windows devices.
Path to certificate in a Windows certificate store.
The path must use backslashes and end with the certificate's thumbprint.
Example: CurrentUser\MY\A11F8A9B5DF5B98BA3508FBCA575D09570E0D2C6
Configures the connection to use MQTT over websockets. Forces the port to 443.
Generated using TypeDoc
Builder functions to create a MqttConnectionConfig which can then be used to create a MqttClientConnection, configured for use with AWS IoT.