This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3220SF: mqtt will

Part Number: CC3220SF

Hi,

how do i set Birth will and Last Will message in Mqtt?

  • Hi,

    If you are using the MQTT library provided with the SDK, then you can use the MQTTClient_Will *willParams member of the main  MQTT_IF_ClientParams_t struct you pass to the MQTT_IF_Connect() call to enable and setup the last will message. There is an example of this in the default mqtt_client demo in the SDK.

    As for the birth message, this isn't something that is explicitly provided in the library like the last will message. You will need to manually publish to the appropriate topic for your broker immediately after connecting in order to provide a birth message, if needed.

    Regards,

    Michael