All Products
Search
Document Center

IoT Platform:Message properties

Last Updated:Jun 08, 2026

When devices publish payloads in different formats on the same topic, subscribers have no standard way to determine how to parse them without inspecting the payload itself. MQTT 5.0 introduces Payload Format Indicator and Content Type — two message properties that let publishers declare format and content directly in the message header. IoT Platform forwards both properties to subscribers unchanged, enabling format-aware routing without payload inspection.

How message properties work

MQTT 5.0 adds two optional properties to PUBLISH messages and will messages: Payload Format Indicator and Content Type. Together, they give subscribers enough context to parse a message payload without inspecting its raw bytes.

image..png

Payload Format Indicator

Payload Format Indicator is a single byte that signals how the payload is encoded. Valid values:

  • 1: the payload is UTF-8 encoded character data.

  • 0: the payload is encoded in an unspecified format, such as binary data.

Content Type

Content Type is a UTF-8 string that describes the nature of the message payload. Set it to a MIME type — for example, text/plain for text files — or to any application-defined string that helps subscribers route and process the message.

IoT Platform forwards the Content Type value to subscribers as-is.

Important

Content Type cannot be modified during message forwarding. To attach metadata that can be changed in transit, use User Property instead — it is the only property that remains editable during message forwarding.

Use cases

Message properties improve interoperability in cross-system messaging scenarios where devices or services produce payloads in different formats. They enable two key capabilities:

  • Support payloads in multiple encoding formats and content types on the same topic.

  • Route and filter messages at intermediate nodes without parsing the payload.

Compatibility with mixed encoding formats and content types

In MQTT, all data on a topic typically shares the same encoding format. As IoT deployments grow, devices often need to publish payloads in different formats on the same topic. Before MQTT 5.0, subscribers had to inspect the payload itself — or rely on topic naming conventions — to determine how to parse it.

With message properties, the publisher declares the format in the message header. Subscribers read Payload Format Indicator and Content Type before touching the payload, and route or parse accordingly.

  • Device 1: publishes JSON strings.

  • Device 2: publishes Protocol Buffers (Protobuf) binary data.

image..png