With a four-part handshake (a MQTT QoS level 2 transmission) the last acknowledge message is the PUBCOMP
messsage.
Following presumptions are made:
- The
PUBCOMP
messsage is sent from the receiver after it processes the message payload and delivers it to other subscribers. - When the sender receives the
PUBCOMP
messages it considers the whole transmission as successful and notifies the caller. - Used resources are purged and the packet identifier can now be reused for further transmissions.
But what if the PUBCOMP
is never received by the sender?
The sender continues some retries by sending PUBREL
(whereby the receiver musst respond with a PUBCOMP
due to MQTT spec).
But what if the PUBCOMP
just refuses to arrive back to the receiver (by whatever means)?
Is the transmission considered as processed, although PUBCOMP
is missing?
How does the sender know that the transmission is assured processed?
From the sender perspective it could also mean that it's own PUBCOMP
has never reached the receiver (which could mean that the transmission has not been processed)...
This leaves the sender in an unknown state. Or not?