Reason codes

In MQTT3, there are only 10 Return Codes returned for the CONNACK and SUBACK message types. With MQTT5, on the other hand, it is possible to pass so-called Reason Codes in many packages. A Reason Code indicates that a predefined protocol error has occurred and is usually transmitted with acknowledge packets so that the client and message broker can react to the error condition.