Introduction to MQTT

您所在的位置:网站首页 Publish软件 Introduction to MQTT

Introduction to MQTT

2023-03-16 16:07| 来源: 网络整理| 查看: 265

QoS 2 - Exactly Once

QoS 2 is the highest level of service in MQTT and guarantees each message is received only once by the intended recipients. QoS level involves additional overhead (four-step handshake) and is the slowest of all service levels.

When a receiver gets a QoS 2 packet from the sender, it processes the message and replies with a publish acknowledgement (PUBREC) packet. If the sender does not get the PUBREC packet, it resends the PUBLISH packet until it receives an acknowledgement. With the PUBREC acknowledgment, the sender discards the initial PUBLISH packet. Then, the sender stores the PUBREC packet and responds with a publish discarded (PUBREL) packet.

Once the receiver gets the PUBREL packet, it can discard all stored states and respond with a publish complete (PUBCOMP) packet. The sender can now delete the stored PUBREC packet and the packet identifier is available for reuse.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3