MQTT Packets retransmission and PUBACK

42 views
Skip to first unread message

Shafreeck Sea

unread,
May 31, 2016, 6:44:26 AM5/31/16
to MQTT
Hi 

I don't understand the retransmission in MQTT protocol well. As I learned, retransmission is only REQUIRED when a new connection is created(refer : http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718103)
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 ?
Reply all
Reply to author
Forward
0 new messages