pubsubclient icon indicating copy to clipboard operation
pubsubclient copied to clipboard

Retain Flag not working

Open nataizya opened this issue 1 year ago • 1 comments

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?

nataizya avatar Nov 30 '23 07:11 nataizya

having the same problem.

HotNoob avatar Feb 29 '24 20:02 HotNoob