The UNSUBACK message is sent by the broker to the client to confirm receipt of an UNSUBSCRIBE message.
The table below shows the fixed header format.
bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|
byte 1 | Message Type (11) | DUP flag | QoS level | RETAIN | ||||
1 | 0 | 1 | 1 | x | x | x | x | |
byte 2 | Remaining length (2) | |||||||
0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
The variable header contains the Message ID for the UNSUBSCRIBE message that is being acknowledged. The table below shows the format of the variable header.
bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|
byte 1 | Message ID MSB | |||||||
byte 2 | Message ID LSB |