Use of MQTT

MQTT使用(mqtt3):https://blog.csdn.net/w1112223334445/article/details/125525689

MQTT publish and subscribe through python: https://blog.csdn.net/qq_45664055/article/details/120238371

QoS is an agreement reached between the sender (Sender) and the receiver (Receiver) of the message:

  • QoS=0 means that a message sent by the Sender can be received by the Receiver at most once, that is to say, the Sender tries its best to send a message to the Receiver, and if the sending fails, forget it;
  • QoS=1 means that a message sent by the Sender can be received by the Receiver at least once, that is to say, the Sender sends a message to the Receiver. If the sender fails, it will continue to retry until the Receiver receives the message. However, due to retransmission, Receiver may receive duplicate messages;
  • QoS=2 means that for a message sent by the Sender, the Receiver ensures that it can receive it only once, that is to say, the Sender tries its best to send a message to the Receiver. Receiver will not receive duplicate messages due to message retransmission.

Guess you like

Origin blog.csdn.net/HELLOMRP/article/details/128896490