UNSUBACK
Fixed header flags: 0000 – all flags reserved
UNSUBACK is the broker's response to UNSUBSCRIBE. In MQTT 5.0, it contains one reason code per topic filter in the UNSUBSCRIBE packet. Reason code 0x00 = Success (subscription removed), 0x11 = No Subscription Existed (filter was not active), 0x80+ = failure codes.
Details
UNSUBACK reason codes (MQTT 5.0) per filter: 0x00 = Success 0x11 = No Subscription Existed 0x80 = Unspecified error 0x83 = Implementation specific error 0x87 = Not Authorized 0x8F = Topic Filter Invalid 0x91 = Packet Identifier In Use
In MQTT 3.1.1, UNSUBACK had no reason codes – just a packet identifier echo, giving no feedback on whether the filter was actually active. MQTT 5.0 per-filter reason codes let clients detect mismatched unsubscribes.
Fixed Header
| Field | Value |
|---|---|
| Packet type (bits 7–4) | 11 (1011₂) |
| First byte (hex) | 0xB0 |
| Flags (bits 3–0) | 0000 – all flags reserved |
| QoS bits apply | No |
| Direction | server-to-client |
| Added in | MQTT 3.1 |