Closed alistairg closed 8 years ago
If want to use retain flag, set kep is true following function. publish(const char* topic, const uint8_t* payload, unsigned int plength, bool kept) publish(const char* topic, const uint8_t* payload, unsigned int plength, bool kept, EMQTT_QOS qos, uint16_t *messageid)
My apologies. I looked at the example (mqttqostest.ino) rather than the source. :)
There is no way to set the "retain" flag on any message other than the "Will" on initial connect