Reputation: 331
I've been trying to find out the flow of the QoS 1, but it's hard.
As I understood, when a publisher sends some packets with QoS1, it must wait for the PUB ACK packet.
I thought when a broker got a PUB packet, it needed to send this to all the subscriber.
Then, the broker also became publisher.
So the broker send this PUB packet to all subscribers
and the broker also waited for the PUB ACK packets from all of the subscribers.
When the broker received all of the PUB ACK packet, then send PUB ACK packet to the original publisher(client).
Am I right?
(There was a description with the flow between a publisher and the Broker but not for between Broker and subscribers)
Upvotes: 3
Views: 2149
Reputation: 96
There is a misunderstanding between the protocol message acknoledgement and the process acknowledgement. Message Acknowledgement confirms the delivery of the message and Process acknowledgement should be sent as a separate message from the device.
Even though it is between a single client and broker, We always advice our customers to implement their own process acknowledgement when the edge device complete their process.
Upvotes: 0
Reputation: 59751
QoS is only ever between one client and the broker at a time, there is no end to end (publisher to subscriber) delivery notification.
It is perfectly possible to publish a message at QoS 1 but only have subscribers at QoS 0. You can also have multiple subscribers each with different QoS subscriptions, some at QoS 0, some at QoS 1 and finally some at QoS 2.
The QoS exchange between the publisher and the broker should complete before it starts to deliver that message onward to the subscribers.
Upvotes: 6
Reputation: 10075
Just to enforce the great explanation from hardillb, the broker doesn't wait for the other subscribers sending the PUBACK before sending the PUBACK to the original publisher. It could depend on the broker implementation but it just replies to the publisher with the PUBACK and then start to publish (yes it's a publisher itself) to the subscribers which could be subscribed with different QoS levels (0, 1 or 2).
Upvotes: 2