Overview of data forwarding
IoT Platform provides a new data forwarding service that forwards device messages to other topics or Alibaba Cloud products for storage or processing. This topic describes the data forwarding feature and explains how to forward data to Alibaba Cloud products.
What is data forwarding
When devices communicate with IoT Platform over topics, you can write scripts to process data from these topics. You can then use the data forwarding feature to send the processed data to other device topics or Alibaba Cloud products for storage or processing.
Compared to the previous version, the new data forwarding service includes a Resolver. The Resolver can process more complex message data before it interacts with other Alibaba Cloud products. For example, you can configure multiple topics as data sources in a resolver. Then, you can use a script to process the data and forward it to other topics or Alibaba Cloud products.
The following destinations are supported for data forwarding:
Destination | Description | References |
Topic | Forwards data to a topic of another device to enable M2M communication. | |
Forward device messages to your business server by subscribing to a consumer group from an AMQP server-side client. | ||
Forwards device data to the cloud-native database PolarDB for storage. | ||
Forwards device data to Alibaba Cloud products for storage. | ||
Forwards device data to Alibaba Cloud products for storage. | ||
Forwards device data to DataHub. Then, use Realtime Compute for Apache Flink for stream computing. Use MaxCompute for large-scale offline computing. | ||
Forwards device data to Message Queue for Apache RocketMQ or Simple Message Queue (formerly MNS) (SMQ) for highly reliable data consumption. | ||
Forwards device data to Function Compute for event-driven computing. |
Data forwarding flow
Using the data forwarding feature, you can implement a full-stack service for data collection, processing, and storage without purchasing servers to deploy a distributed architecture.
Usage notes
Before you use the data forwarding feature to forward device data to other Alibaba Cloud products, confirm that the destination product is available in the region and supports data forwarding in the required format. For more information, see Features by region.
Limits
The message limits for the new data forwarding feature are the same as those for the previous version.
Limitations | Description | Limit |
Resolver | The maximum number of resolvers that an instance can contain. | 1,000 |
Data source | The maximum number of data sources that can be associated with a resolver. | 1 |
The maximum number of topics that a data source can contain. | 1,000 | |
Data destination | The maximum number of data destinations that can be associated with a resolver. | 10 |
The maximum number of operations that a data destination can contain. | 1 | |
The maximum number of destinations for abnormal data that can be associated with a resolver. | 1 | |
Parsing script | The maximum size of a resolver script. | 120 KB |
The maximum number of times that a data forwarding function can be executed in a loop within a resolver script. For more information about data forwarding functions, see Functions to forward data to a data destination. | 100 |
Procedure
Create a data source: Add the topics that contain the messages you want to forward as a data source. A data source can contain multiple topics.
Create a data destination: Add the destination topic or Alibaba Cloud product to which you want to forward data.
Configure and start a resolver: Create a resolver, associate it with the data source and data destination, and then configure a script for the resolver. This script processes and forwards the data from the data source.
References
Script syntax: Describes the syntax used in resolver scripts.
Function list: Lists the functions that are supported in resolver scripts.
Data formats: Describes the format of data from basic communication topics and TSL model communication topics after the data is parsed by the TSL model. The fields in a resolver script must use this parsed data format.