arduino-libraries / ArduinoMqttClient

ArduinoMqttClient Library for Arduino
GNU Lesser General Public License v2.1
186 stars 73 forks source link

Can't send retained messages #69

Open iris-pascoal opened 2 years ago

iris-pascoal commented 2 years ago

Hi! I'm trying to send a retained message, my code is as follows: mqttClient.beginMessage(topicVRCommand, true); mqttClient.print("WAKE_UP_KITCHEN"); mqttClient.endMessage();

The message is not going as retained even though i have the reained flag as true. Anyone had the same problem?

Quantiversal commented 1 year ago

I seem to have the same problem 😔

Quantiversal commented 1 year ago

Actually mine is working. I quit MQTT Explorer then opened it again and saw the flag. I had a misunderstanding of how retained actually works. See: https://github.com/thomasnordquist/MQTT-Explorer/issues/108

Might help.