|Re: [paho-dev] How to use the cleanSession parameter and persistence mechanism for mqtt publisher(publishing messages at QOS 1)|
2) The persistence mechanism stores the state if the application shuts down. When the application restarts, the client library will continue processing the unsent messages.
2.1) This will help in the case of a TCP connection break, but the application does not shut down (or die).
2.2) If cleansession is set to false, yes.
2.3) A callback will be made when the puback is received, or the token will complete. If no puback is received, then these notifications will not occur.
3) No. You need to set the cleansession parameter to false. If it is set to true, then persistence is not needed, as session state is discarded on any TCP connection break.
On 08/15/2016 08:09 PM, Nidhi Kushwaha wrote:
-- Ian Craggs icraggs@xxxxxxxxxx IBM United Kingdom Paho Project Lead; Committer on Mosquitto
Back to the top