pubsubclient
pubsubclient copied to clipboard
Retain Flag not working
Hi,
I am new to programming ESPs and using the PubSubClient so bear with me.
I am trying to publish retained messages to AWS IoT Core with the following line of code:
client.publish(AWS_IOT_STATUS_TOPIC, jsonBuffer, true);
Everything runs fine with no errors but the message is not published to my topic. When I remove the retained flag and have the code as below, the message is published successfully and I can see it in my topic.
client.publish(AWS_IOT_STATUS_TOPIC, jsonBuffer);
I am using the PubSubClient version 2.8 on an ESP8266EX.
Is there anything I could be missing?
having the same problem.