In multiple scenarios, you must process the data that is submitted by devices to IoT Platform or use the data for business applications. IoT Platform allows you to forward device data by using the server-side subscription feature or the feature of data forwarding to an Alibaba Cloud service. This topic describes the scenarios in which the data forwarding features can be applied, and the advantages and disadvantages of the features. You can select a feature based on your business requirements.
Data forwarding features
Feature | Description | References |
Data forwarding to an Alibaba Cloud service | Supports basic data filtering and processing. You can configure data forwarding rules to filter and process device data, and then forward the data to other Alibaba Cloud services. | |
Server-side subscription | Allows you to obtain device messages by using an Advanced Message Queuing Protocol (AMQP) or Simple Message Queue (formerly MNS) (SMQ) client. The server-side subscription feature is easy to use and efficient. However, you cannot use the feature to filter and process device messages. |
Comparison of features and solutions
Feature Comparison
Feature | Scenario | Advantage | Disadvantage | Limits |
Data forwarding to an Alibaba Cloud service |
|
| This feature requires technological expertise because you must write SQL statements and configure data forwarding rules. | For more information about the limits, see Limits on data forwarding. |
Server-side subscription |
| This feature is easy to use and efficient. | You cannot use this feature to filter and process data. |
For more information about the limits, see Limits on server-side subscriptions. |
Comparison of solutions in which data is forwarded to different Alibaba Cloud services
Data Destination | Scenario | Advantage | Disadvantage | References |
Message Queue for Apache RocketMQ | You can forward device data to Message Queue for Apache RocketMQ when you want to perform fine-grained processing on the data from a large number of devices. When the throughput of device data exceeds 1,000 QPS, we recommend that you forward device data to Message Queue for Apache RocketMQ. |
| Message Queue for Apache RocketMQ has less satisfactory performance when you access Alibaba Cloud services over the Internet. Enterprise Platinum Edition instances provide better performance than Standard Edition instances. | |
Simple Message Queue (formerly MNS) (SMQ) | You can forward device data to MNS if you want to perform fine-grained processing on the device data when you access Alibaba Cloud services over the Internet. When the throughput of device data is less than 1,000 QPS, we recommend that you forward data to MNS. |
| However, MNS provides slightly poorer performance than Message Queue for Apache RocketMQ. | |
ApsaraDB RDS | You can forward device data to ApsaraDB RDS when you only want to store the data. | Data is written to databases. | N/A | |
Time Series Database (TSDB) | You can forward device data to TSDB when you want to analyze and monitor your business based on the device data. | Data is written to TSDB. | N/A | |
Tablestore | You can forward device data to Tablestore when you only want to store the data. | Data is written to Tablestore. | N/A | |
Function Compute | You can forward device data to Function Compute when you want to simplify the device development process and process the device data in a flexible manner. |
| The costs of Function Compute are slightly higher than those of other solutions. |
Usage notes
Server-side subscription
Feature description | Remarks |
A server can use AMQP SDK or Simple Message Queue (formerly MNS) (SMQ) SDK to receive all subscribed device messages of a product. The device messages include upstream messages and messages about status changes, lifecycle changes, historical TSL data, status of over-the-air (OTA) updates, gateway and sub-device connections, and topological changes. |
|
Data forwarding to Message Queue for Apache RocketMQ
Feature description | Limits | Remarks |
You can forward messages from a specified topic in IoT Platform to a topic in Message Queue for Apache RocketMQ. Then, you can use Message Queue for Apache RocketMQ SDK to receive the messages.
|
|
|
Data forwarding to Simple Message Queue (formerly MNS) (SMQ)
Feature description | Limits | Remarks |
You can forward messages from a specified topic in IoT Platform to a topic in MNS. Then, you can use MNS SDK to receive these messages. You can access MNS over the Internet. When the throughput of device messages is less than 1,000 QPS, we recommend that you use MNS. | For more information about the limits on MNS topics, see Limits. | If a message fails to be forwarded, the rules engine retries to forward the message. If a specified number of retries fail, the message is discarded. Latency may occur in message-based services. To minimize the impact of data loss or transmission delay, we recommend that you take preventive measures. |
Data forwarding to Function Compute
Feature description | Limits | Remarks |
You can forward messages from a specified topic in IoT Platform to Function Compute. Then, you can use Function Compute to process these messages. Function Compute is a fully managed service that simplifies business development. | For more information about the limits on Function Compute, see Limits. |
|