Custom Topic Communications

Overview

The IoT platform uses topics to communicate with devices over MQTT. There are custom topics and system topics. System topics have been predefined on the platform. If the system topics cannot meet your service requirements, you can customize a topic for the product. The custom topic is automatically mapped to all devices of the product.

Topic Categories

Category

Description

System topic

The platform predefines topics for communications with devices. For details on the topic list and functions, see Topic Definition.

Custom topic

Devices and the platform can communicate based on custom topics.

Custom topics are applicable to:

  • Message transfer
  • Message delivery

Restrictions

You can define a maximum of 10 custom topics for a product model.

Procedure

  1. Log in to the IoTDA console.
  2. In the navigation pane, click Products. In the product list, click View in the row of a product to access its details. On the Optional Configuration tab page, click Add Topic.
  3. In the dialog box displayed, select device operation permissions and enter the topic name.

    Parameter

    Description

    Device Operation Permissions

    • Publish: Devices can report messages using this topic. A topic is carried in a device message during data transfer for better classification.

    • Subscription: Devices can receive messages using this topic. The platform can deliver messages to devices by topic.

    • Publish and subscription: Devices can report and receive messages using this topic.

    Topic Name

    Customize the topic name. The name can contain 1 to 64 bytes, consisting of letters, numbers, underscores (_), plus signs (+), and number signs (#). The number sign can be used in a topic name only when Device Operation Permissions is Subscription.

    Description

    Provide a description of the topic.

  4. Click OK.

    After the topic is added, you can modify or delete it in the custom topic list.

For details on how to use custom topics, see Communicating Using a Custom Topic