Hi
When a Client reconnects with CleanSession set to 0, both the Client and Server MUST re-send any unacknowledged PUBLISH Packets (where QoS > 0) and PUBREL Packets using their original Packet Identifiers [MQTT-4.4.0-1]. This is the only circumstance where a Client or Server is REQUIRED to redeliver messages.
I may work in most cases, but considering a message was published from the broker to client and then the client persist the message and send back a puback, what if the message can not persisted ? The message is lost ? It is the same when publishing message to a mqtt broker and the broker can not handle the message properly (maybe due to can not alloc enough memory or some subnode crashed). Whatever happened, the message would be lost.
So can MQTT protocol solve these problems ? If not what is the correct way to handle retransmission in practice ?