monstrenyatko / ArduinoMqtt

MQTT client for Arduino
MIT License
72 stars 13 forks source link

support LastWill Message #3

Closed tarzan115 closed 7 years ago

tarzan115 commented 7 years ago

I wonder if your library has support Lastwill message?

monstrenyatko commented 7 years ago

@tarzan115 It should work. Please take a look on MqttClient::connect. The first parameter MQTTPacket_connectData allows you to specify MQTT CONNECT message options. I believe you are looking for MQTTPacket_connectData::will that contains all parameters related to LWT and MQTTPacket_connectData::willFlag that must be set to true for enabling of the LWT.

tarzan115 commented 7 years ago

Sorry, my mistake. I got it. thank you so much.