Custom Topic Communications
Introduction
IoTDA uses topics to communicate with devices connected using 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 of the topic list and functions, see Topics. |
Custom topic |
You can customize topics for device-platform communications. Types of custom topics:
|
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.
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.
Figure 1 Adding a custom topic
- In the displayed dialog box, select device operation permissions and enter the topic name.
Figure 2 Custom topic
- 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 feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot