This article is a mirror article of machine translation, please click here to jump to the original article.

View: 9470|Reply: 0

Mqtt's service quality level Qos

[Copy link]
Posted on 2/14/2019 8:56:55 PM | | | |
Qos0

The sender only sends the message once, without retries, and the broker does not return a confirmation message. In the case of Qos0, the broker may not receive the message, as shown in the following figure:



Qos1

The sender sends a message at least once to ensure that the message reaches the broker, and the broker needs to return a confirmation message PUBACK. In the case of Qos1, the broker may accept duplicate messages, as shown in the following figure:



Qos2

Qos2 uses two-stage confirmation to ensure that messages are not lost and not duplicated. In the case of Qos2, the broker will definitely receive the message only once, as shown in the following figure:


Qos1 VS Qos2

Qos2 will have a lot of overhead compared to Qos1 because the broker has two additional actions:

  • Deduplication. To ensure that messages are not duplicated, the broker must perform deduplication;
  • Ensure that the response message PUBREC reaches the client. The broker must wait for the client's response to the PUBREC message in the PUBREL, and only after receiving a confirmation message from the client can the broker deliver the message to the subscriber.





Previous:CentOS solves the problem that the external network cannot be accessed after the docker port is mapped to the host
Next:[Android] Today's American Drama 1.3.3 Ad-Free Edition A gathering place for professional American drama fans
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com