[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: What happens if PUBREC is not matched to PUBLISH
Hi, What is the correct behavior if the client (or broker) receives PUBREC packet but does not sent corresponding PUBLISH before ? Here is the scenario Pre condition. Client hasn't sent PUBLISH QoS2 Packet Identifier 1. 1. The client receives PUBREC Packet Identifier 1, Reason Code 0x00(Success) I guess it is a protocol error but I couldn't find the description about that in the spec https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html I found PUBREL reason code 0x92(Packet Identifier not found). https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901144 Perhaps the client should send PUBREL with reason code 0x92? PUBCOMP has the same reason code too. https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901154 So the expected behavior is as follows ? 1. The client receives PUBREC Packet Identifier 1, Reason Code 0x00(Success) 2. The client sends PUBREL Packet Identifier 1, Reason Code 0x92(Packet Identifier not found). 3. The broker sends PUBCOMP Packet Identifier 1, Reason Code 0x92(Packet Identifier not found) to the client. Is that correct? Or, 1. The client receives PUBREC Packet Identifier 1, Reason Code 0x00(Success) 2. The client sends DISCONNECT Packet with Reason Code 0x82(Protocol error) Any ideas? ---- Thanks, Takatoshi
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]