User properties
One of the most important innovations in MQTT5 are the so-called User properties. These are key/value pairs that are set for almost all MQTT packet types and can transport additional metadata - independent of the actual message content. There is no limit to the number of user properties as long as the maximum size of an MQTT message is not exceeded. This feature is similar to the key/value pairs found in an HTTP header, for example.
The advantage of user properties is that they are decoupled from the actual message content. For example, description information for the message content can be transmitted, which simplifies the encoding/decoding of the message content on the receiver side.
Furthermore, routing information can also be transmitted with the help of User properties, so that a recipient is told what to do with the received message content, for example.
