Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

reason code

A number an MQTT 5 broker or client sends back to say exactly why something succeeded or failed.

MQTT 5 acknowledgement and DISCONNECT packets carry a one-byte reason code; values below 0x80 report success and values from 0x80 report a specific failure such as "not authorized" or "topic name invalid".

Examples

  • An MQTT 5 broker that rejects gh-a1's publish because the ACL forbids the topic answers with reason code 0x87 (Not authorized) in the PUBACK, which MQTT 3.1.1 could not report.

Read the full section →