You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having the same issue. How do we use the clean session flag to get the messages sent when the device was offline. Please respond. This is critical for my application.
The PubSubClient class operates mostly as it did before. However, the connect(), publish(), subscribe(), and unsubscribe() methods can now take an appropriate MQTT object. This allows extra options to be set e.g QoS on publish, or multiple topics with one (un)subscribe message.
You can use the MQTT classes and their chainable setter methods like this:
client.connect(MQTT::Connect("clientId")
.set_clean_session()
.set_will("status", "down")
.set_auth("username", "password)
.set_keepalive(30)
);
Basically you need to use the unset_clean_session() here
Hi lmroy,
I'm trying my esp retrieve messages from the server that may have existed while he was off. I tried to connect with the variable:
but I can not get my esp recover lost messages.
Must I configure anything something on the mosca server?
Thanks and Regards
Wonderfull library!!!!!!!!!!!!!
The text was updated successfully, but these errors were encountered: