Open chenchuangchn opened 6 years ago
1) See http://modelbasedtesting.co.uk/2013/11/24/mqtt-qos-and-persistence/ Without persistence, QoS 1 and 2 protect against connection loss. A persistence interface is in the main paho C client - is the embedded client the best choice for you? What OS/hardware are you using?
2) It looks like re-sending is not implemented in MQTTClient-C, as opposed to MQTTClient (the C++ version). I didn't implement the C version, and I hadn't realised that was not part of it. So, yes, that is an omission - it should be implemented the same way as the C++ client library - the intention is to keep the codebases the same except for the C/C++ differences.
Message retry is only attempted on reconnection - in connect, not publish (see C++ MQTTClient). This is the standard approach in MQTT versions 3.1.1 and onwards. In practice, I and others have found that retries during a connection only exacerbate the problem of an overloaded network.
I'
Thanks for tolerating my sick English
Hi~ I have an question about the Qos2 implement of MQTTPublish() fuction. As we know Qos2 guarantee s Exactly once delivery. The progress is sender send PUBLISH-->receiver receive PUBLISH, store Packet Identifier or message and send PUBREC--> sender receive PUBREC and send PUBREL-->receiver receive PUBREL and send PUBCOMP-->send receive PUBCOMP. But there are some questions: