1

With a four-part handshake (a MQTT QoS level 2 transmission) the last acknowledge message is the PUBCOMP messsage.

Following presumptions are made:

  1. The PUBCOMP messsage is sent from the receiver after it processes the message payload and delivers it to other subscribers.
  2. When the sender receives the PUBCOMP messages it considers the whole transmission as successful and notifies the caller.
  3. 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?

cheneym
  • 4,062
  • 1
  • 16
  • 10
  • Just to be clear, there is no end to end notification in MQTT, the Publisher will only know that the message has reached the Broker, never the Subscriber. The QOS handshake is between the Publisher and the Broker, then separately between the Broker and the Subscriber. – hardillb Sep 18 '18 at 16:39
  • @hardillb: Thank you for the hint. Yes I have got this in mind. It still remains unclear to me how a sender should behave when a `PUBCOMP` goes missing... – cheneym Sep 19 '18 at 06:44
  • Since MQTT depends on a reliable transport (e.g. TCP) it expects the underlying transport layer to keep trying to deliver the PUBCOMP until it gets there. – hardillb Sep 19 '18 at 07:53
  • Suppose we have a badly failed Subscriber? Failed just as it was about to send that PUBCOMP message. We can't get the Subscriber back online any time soon. We would seem to have a message in limbo, it will never be deleted automatically. – djna Jul 20 '21 at 10:37

0 Answers0