Custom Topic Communications
Overview
The IoT platform uses topics to communicate with devices over MQTT. There are custom topics and system topics. System topics are basic communication topics preconfigured on the platform. You can also customize topics on the platform based on service requirements.
Scenarios
- Devices publish messages to a custom topic, from which an application receives the messages using the data forwarding function.
- An application calls the API for delivering a message to a device to publish messages to a specified custom topic. Devices subscribe to this topic to receive messages from the server.
Topic Categories
Category |
Description |
---|---|
System topic |
The platform predefines topics for communications with devices. For details on the topic list and functions, see system topics. |
Custom topic |
Devices and the platform can communicate based on custom topics. Types of custom topics:
|
Restrictions
You can define a maximum of 50 custom topics for a product model.
Procedure
- Access the IoTDA service page and click Access Console.
- Select an MQTT product. On the product details page, click the Topic Management tab, select Custom Topic, and click Add Topic.
- In the dialog box displayed, select device operation permissions and enter the topic name.
- Click OK.
After the topic is added, you can modify or delete it in the custom topic list.
For details about how to use custom topics, see Using a Custom Topic for Communication. If a topic prefixed with $oc/devices/{device_id}/user/ cannot be used, you need to customize a topic. For details, see Migrating a Custom Topic to the Cloud.
Feedback
Was this page helpful?
Provide feedbackFor any further questions, feel free to contact us through the chatbot.
Chatbot