aws / aws-iot-device-sdk-python-v2

Next generation AWS IoT Client SDK for Python using the AWS Common Runtime
Apache License 2.0
406 stars 213 forks source link

How to call MQTT Last Will and Testament #187

Closed ITBin404 closed 3 years ago

ITBin404 commented 3 years ago

Paradigm not found

jmklix commented 3 years ago
lwt_message = "{\"state\":{\"reported\":{\"connected\":0}}}"
lwt = mqtt.Will(topic="my/things/<thing id>/shadow/update", qos=1, payload=lwt_message, retain=False)

mqtt_connection = mqtt_connection_builder.mtls_from_path(
...
will=lwt,
...
)

More details can be found here.

ITBin404 commented 3 years ago

thanks