Updated on 2024-11-06 GMT+08:00

Overview

Introduction

IoTDA uses topics to communicate with devices connected using MQTT. There are custom topics and system topics. System topics are basic communications topics preconfigured on the platform. You can also customize topics on the platform based on service requirements. Note that message through both custom topics and system topics are transparently transmitted on the platform, which means that the platform does not proactively parse data content.

Table 1 Topic categories

Category

Description

Scenario

System topic

The platform predefines topics for communications with devices. For details of the topic list and functions, see Topics.

Message reporting, property reporting, command delivery, and events

Custom topic

You can customize topics for device-platform communications.

Types of custom topics:

  • Custom Topics Starting with $oc: Topics defined in the product are prefixed with $oc/devices/{device_id}/user/. During message reporting or delivery, the platform checks whether the topic is defined in the product. Undefined topics will be rejected by the platform.
  • Custom Topics Not Starting with $oc: Topics that do not start with $oc, for example, /aircondition/data/up. They are used for upstream and downstream message communications based on MQTT rules. The platform checks the topic permission using topic policies.

Scenarios where services require specific topics, such as M2M communications, broadcast communications, and device migration.

Scenarios

Constraints

  • You can define a maximum of 50 custom topics for a product model.
  • Custom topics are only available for message communications.
  • Max. length of a custom MQTT topic: 128 bytes.