Page 1 of 1

MQTT last will and testament message

Posted: Tue Aug 24, 2021 10:14 am
by manel_issaoui
Hello esspressif community,
I've been working with MQTT lately and decided to add the LWT feature which "as described in esp-idf website" can be enabled just by configuring the following fields in esp_mqtt_client_config_t-struct defined in mqtt_client.c .
This is exactly what I have done and I used mosquitto server to test my client but the problem is the server sends the LWT message to the subscribed clients immediately when the client connects and then re-send the LWT message when detecting an ungraceful disconnect.
I tried to figure out what is the problem but it seems kile all the configurations are enabled and working fine.
Can any one help me please,
Thank you