You can forward the data that is processed by an SQL statement in a data forwarding rule to a topic. This implements machine-to-machine (M2M) communication or other communication scenarios.
The following figure shows the data forwarding process.
- Log on to the IoT Platform console.
- On the Overview page, find the instance and click the instance name to go to the Instance Details page. Notice Enterprise Edition instances are available only in the China (shanghai) and Japan (Tokyo) region. If your IoT Platform is not activated in the China (shanghai) or Japan (Tokyo) region, skip this step.
- In the left-side navigation pane, choose .
- Click View next to the rule that you want to manage. The Data Forwarding Rule page appears. Notice If the new version of the Data Forwarding page is displayed, click Back to Previous Version in the upper-right corner, and then click View in the Actions column of the rule that you want to manage.
- In the Forward Data section, click Add Operation.
- In the Add Operation dialog box, select Publish Data to Another Topic from the Operation drop-down list. Follow the instructions on the page to configure
other parameters and click OK.
Parameter Description Select Operation Select Publish Data to Another Topic. Topic Select a destination topic to which you want to forward data.
- Custom: specifies a custom topic as the destination topic. You must set the permission of the custom topic to subscribe. This allows devices to subscribe to the topic and obtain forwarded messages from the topic.
- Send Downstream TSL Data: specifies a topic that is used by devices to receive commands
as the destination topic. These commands are used to configure device properties.
By default, the topic is
thing/service/property/set. A device receives forwarded data from the topic. Then, the device configures the required property based on the received data. If you want to configure properties for the devices that subscribe to the destination topic based on the forwarded data, you can set the Topic parameter to this value.
After you select a topic type, you must select a product, device, and topic.Notice If a device does not subscribe to the destination topic, the device cannot receive forwarded data.
For example, if you use MQTT.fx to connect Device A to IoT Platform, Device A cannot automatically subscribe to device topics. If Device B forwards data to the
thing/service/property/settopic and Device A does not subscribe to the topic, Device A cannot receive the data that is forwarded by Device B.
For more information, see Automatic topic subscription.
- Go to the Data Forwarding page, find the rule that you managed, and then click Start in the Actions column of the rule.