IOT-MQTT protocol - Control packets -PUBLISHREC

3.5 PUBREC - release has been received (already received QoS 2 release, Part 1)

PUBREC PUBLISH packet is a response to packet data having a QoS 2. It is a protocol for exchanging a second QoS 2 data packets.

3.5.1 Fixed Header fixed title

FIG 3.14 - PUBREC fixed packet header

Place

7

6

5

4

3

2

1

0

Byte 1

MQTT control packet type (5)

reserved

 

0

1

0

1

0

0

0

0

Byte 2

The remaining length (2)

 

0

0

0

0

0

0

1

0

The remaining length field

This is a variable length header. For PUBREC packet, a value of 2.

3.5.2 Variable Header variable head

Variable header contains a packet identifier being acknowledged PUBLISH package.

FIG 3.15 - PUBREC packet header variables

Place

7

6

5

4

3

2

1

0

Byte 1

MSB packet identifier

Byte 2

LSB packet identifier

3.5.3 Payload Payload

PUBREC packet no load.

3.5.4 Actions Action

This is described in detail in Section 4.3.3.

Guess you like

Origin blog.csdn.net/leeahuamsg/article/details/93468210