IoT Platform provides the data forwarding feature of the new version. You can use the new version to execute custom scripts to process the data of a topic to which a device subscribes, and forward the processed data to other topics or other Alibaba Cloud services for storage or subsequent processing.
What is data forwarding?
For more information, see Data forwarding (old version).
Compared with the data forwarding feature of the old version, the data forwarding feature of the new version provides parsers. The parsers help transform and process device data of more complex structures, and then forward the processed data to other Alibaba Cloud services. For example, you can specify multiple topics when you configure a data source for a parser. The data forwarding feature uses the parser to transform the data that is obtained from the data sources and forward the transformed data to other topics or Alibaba Cloud services.
The following table describes the supported data destinations.
|You can forward data to the topics to which another device subscribes to implement machine-to-machine (M2M) communication.
|Forward data to another topic
|AMQP consumer group
|You can forward device messages to your business server by using an Advanced Message Queuing Protocol (AMQP) consumer group.
|You can forward device data to the Alibaba Cloud services for storage.
|Forward data to ApsaraDB RDS
|Forward data to TSDB
|You can forward to device data to Message Queue for Apache RocketMQ or Message Service (MNS) to consume the data in a highly reliable manner.
|Forward data to Message Queue for Apache RocketMQ
|Forward data to Message Service (MNS)
|You can forward data to Function Compute to perform event-driven computing.
|Forward data to Function Compute
Data forwarding process
The data forwarding feature allows you to efficiently collect, compute, and store data. You do not need to purchase servers to deploy a distributed architecture.
Before you use the data forwarding feature to forward device data to a different Alibaba Cloud service, make sure that the destination cloud service is available in the specified region and supports the format of the forwarded data. For more information, see Regions.
The message-related limits of the data forwarding feature of the new version are the same as the the message-related limits of the data forwarding feature of the old version.
|The maximum number of parsers that an instance can contain.
|The maximum number of data sources that can be associated with a parser.
|The maximum number of topics that a data source can contain.
|The maximum number of data destinations that can be associated with a parser.
|The maximum number of operations that a data destination can contain.
|The maximum number of error data destinations that can be associated with a parser.
|The maximum size of a parser script.
|The maximum number of times that a data forwarding function can be executed in a loop
in a parser script.
For more information about data forwarding functions, see Forward data to destinations.
- Create a data source: describes how to create a data source and add one or more topics to the data source from which data is forwarded. You can add multiple topics to a data source.
- Create a data destination: describes how to create a data destination and add one or more topics or Alibaba Cloud services to the data destination to which data is forwarded.
- Configure and enable a parser: describes how to create a parser, associate the parser with the configured data source and data destination, and then write a parser script that can help transform and process the data from the data source. This helps you implement data forwarding.
- Script syntax: describes the syntax of a parser script.
- Functions: describes the functions that can be used in a parser script.
- Data formats: describes the data formats of basic communication topics and TSL-based communication topics. A TSL model is used to parse the data that is sent to a topic. When you write a parser script, you must specify fields based on the parsed data format.