Updated on 2024-04-29 GMT+08:00

Data Forwarding

Overview

The data forwarding function connects IoTDA and other cloud services to smoothly transfer device data to the message middleware, storage and data analysis services, and applications. Currently, IoTDA supports multiple forwarding types.

Table 1 Data forwarding types

Type

Forwarding Target

Description

Operation

Data analysis

Data Ingestion Service (DIS)

Data is transferred to DIS. With DIS, you can store data to Object Storage Service (OBS), MapReduce Service (MRS), Data Lake Insight (DLI), and Data Warehouse Service (DWS). Supported dump tasks vary according to the purchased DIS instances.

Scenarios: real-time data transfer from external systems to cloud services

Reference specifications: One partition supports access at 1 Mbit/s and data read at 2 Mbit/s.

Forwarding Data to DIS

Distributed Message Service (DMS) for Kafka

Data is transferred to DMS for Kafka for real-time data transmission, stream data processing, system decoupling, and traffic balancing. DMS for Kafka is a fully managed service featuring high throughput, concurrency, reliability, and scalability.

Scenarios: log collection, stream data transmission, online/offline system analysis, and real-time monitoring

Learn more about Kafka instance specifications.

Forwarding Data to DMS for Kafka for Storage

Log Tank Service (LTS)

Data is transferred to LTS for one-stop log collection, log search in seconds, massive log storage, log structuring and transfer, and visualized charts.

Scenarios: application O&M, visual analysis of network logs, classified protection compliance, and operation analysis

Learn more about log stream specifications.

Run Logs

FunctionGraph

Data is transferred to FunctionGraph. It allows you to run your code without provisioning or managing servers, while ensuring high availability and scalability. All you need to do is upload your code and set execution conditions, and FunctionGraph will take care of the rest. Pay only for what you use and not when your code is not running.

Forwarding Data to FunctionGraph

Data storage

GeminiDB Influx

Data is transferred to GaussDB(for Influx), a cloud-native time series database compatible with InfluxDB. GaussDB(for Influx) reads and writes time series data with high performance and compression ratio in high concurrency scenarios, provides cold and hot tiered storage, elastic scale-out, and monitoring and alarm reporting. It stores the data with compression algorithms, allows you to query data using SQL-like statements, and supports multi-dimensional aggregation computing and visual analysis.

Scenarios: It is widely used to monitor resources, services, IoT devices, and industrial production processes, evaluate production quality, and trace faults. With high throughput and concurrency, it can handle a large number of connections in a very short period of time, making it an excellent choice for IoT applications.

Learn more about InfluxDB instance specifications.

Forwarding Data to GeminiDB Influx

RDS for MySQL

Data is transferred to RDS for MySQL. Compared with self-managed databases, this service is cheaper, out-of-the-box, and easy to operate and maintain. It supports auto scaling and provides functions such as instance management and monitoring, backup and restoration, log management, and parameter management. Standalone and primary/standby deployment modes are available.

Scenarios: website, gaming, e-commerce, and financial services, and mobile and enterprise applications

Learn more about RDS for MySQL instance specifications.

Forwarding Data to MySQL for Storage

Object Storage Service (OBS)

Data is transferred to OBS. OBS provides customers with massive, secure, reliable, and cost-effective data storage capabilities and multiple storage types. OBS can work with Cloud Stream Service (CS) to analyze stream data in real time. The analysis results can be used for data visualization in other cloud services or third-party applications.

Scenarios: massive big data storage and analysis

Learn more about OBS storage specifications.

Forwarding Device Data to OBS for Long-Term Storage

Maximum data forwarding rate through the public network: 1 Mbit/s. The excess messages will be discarded.

Procedure

  1. Access the IoTDA service page and click Access Console.
  2. In the navigation pane, choose Rules > Data Forwarding, and click Create Rule in the upper left corner.
  3. Configure related parameters and click Create Rule.

    Table 2 Parameters for creating a rule

    Parameter

    Description

    Rule Name

    Name of the rule to be created.

    Description

    Description of the rule.

    Data Source

    • Device: Device information, such as device addition, deletion, and update, will be forwarded. When Data Source is set to Device, quick configuration is not supported.
    • Device property: A property value reported by a device in a resource space will be forwarded. Click Quick Configuration on the right and select the product, property, and service data to forward.
    • Device message: A message reported by a device in a resource space will be forwarded. Click Quick Configuration on the right and select data of a specified topic to forward. Select the product to which the topic belongs and enter the topic name. You can use a custom topic on the product details page or a preset topic.
    • Device message status: The status of device messages exchanged between the device and platform will be forwarded. For details on the device message status, see Message Delivery Usage. When Data Source is set to Device message status, quick configuration is not supported.
    • Device status: The status change of a directly or an indirectly connected device in a resource space will be forwarded. Click Quick Configuration on the right to forward information about devices whose status is Online, Offline, or Abnormal to other services. For details on the status of devices directly connected to the IoT platform, see Device Status.
    • Batch task: The batch task status will be forwarded. When Data Source is set to Batch Task, quick configuration is not supported.
    • Product: Product information, such as product addition, deletion, and update, will be forwarded. When Data Source is set to Product, quick configuration is not supported.
    • Asynchronous command status of the device: Status changes of asynchronous commands to devices using LwM2M over CoAP will be forwarded. For details on the asynchronous command status of devices, see Asynchronous Command Delivery. When Data Source is set to Asynchronous command status of the device, quick configuration is not supported.
    • Run log: Service run logs of MQTT devices will be forwarded. When Data Source is set to Run log, quick configuration is not supported.

    Trigger

    After you select a data source, the platform automatically matches trigger events.

    Resource Space

    You can select a single resource space or all resource spaces. If All resource spaces is selected, quick configuration is not supported.

  4. Click the Set Forwarding Target tab, and then click Add to set a forwarding target.

    Data can be forwarded to Data Ingestion Service (DIS), Distributed Message Service (DMS) for Kafka, Object Storage Service (OBS), Third-party applications (HTTP push), AMQP message queues, FunctionGraph, Log Tank Service (LTS), GeminiDB Influx, and RDS for MySQL.

    Table 3 Parameters for setting the forwarding target

    Forwarding Target

    Description

    Data Ingestion Service (DIS)

    • Region: Select the region of the service to which data will be forwarded. If you are not authorized to access the service in this region, perform authorization as required.
    • Stream Homing: You can select either of the following:
      • In-house stream: Select a stream. If no DIS stream is available, create one on the DIS console.
      • Delegated by others: You can use DIS streams authorized by other users. Obtain the stream ID from the DIS console.

    Distributed Message Service (DMS) for Kafka

    NOTE:

    Data can be forwarded only to Kafka premium instances. You need to enable automatic topic creation.

    • Region: Select the region of the service to which data will be forwarded. If you are not authorized to access the service in this region, perform authorization as required.
    • Connection Address: Obtain the connection address by following the instructions provided in Accessing a Kafka Instance with SASL. Basic and standard instances support only access to Kafka premium instances over the Internet. Enterprise instances support access to Kafka premium instances over a private network.
    • Topic: Customize a topic.
    • Data Transmission Encryption: If data transmission encryption is enabled, enter the SASL username and password that you entered when buying a Kafka instance.

    Object Storage Service (OBS)

    • Region: Select the region of the service to which data will be forwarded. If you are not authorized to access the service in this region, perform authorization as required.
    • OBS Bucket: Select a bucket as required. If no OBS bucket is available, create one on the OBS console.
    • Custom Directory: Separate different directory levels are by slashes (/). The directory cannot start or end with a slash (/) or contain two or more consecutive slashes (/).

    Third-party application (HTTP push)

    You can use HTTP or HTTPS to push messages. For details on how to set parameters, see HTTP/HTTPS Subscription/Push.

    AMQP message queue

    Message Queue: Select the queue to which messages are to be pushed. If no queue is available, create one. For details on the restrictions on message queue names, see Configuring AMQP Server Subscription.

    FunctionGraph

    NOTE:

    Currently, only data of instances of Enterprise and Standard editions can be forwarded to FunctionGraph.

    • Function Name: Select the name (latest version) of the function to be called. Currently, cross-region function calling is not supported. If no function is available, create one.

    GeminiDB Influx

    NOTE:

    Currently, only data of instances of Enterprise and Standard editions can be forwarded to GeminiDB Influx.

    • Database Instance Address: Enter the address for connecting to the InfluxDB instance. IoTDA Enterprise edition instances can connect to InfluxDB using private network IP addresses, while Standard edition instances support only public network connection. For details, see Connection Methods.
    • Database Name: Enter a database name. If no database exists, go to the GeminiDB Influx console to create a database.
    • Access Account and Access Password: Access the GeminiDB Influx console to obtain the account and password. For details, see Resetting the Administrator Password.
    • Table: Enter the name of the target table (measurement). If the table does not exist, it will be automatically created.
    • Field Mappings:
      • Forwarding Field: Enter the attribute name of the data to be forwarded. Data to be forwarded is in JSON format. Separate multi-level attribute names with periods (.). For details about the format of data to be forwarded, see Data Transfer APIs.
      • Target Field: Enter the column name of the database.

    RDS for MySQL

    NOTE:

    Currently, only data of instances of Enterprise and Standard editions can be forwarded to RDS for MySQL.

    • Database Instance Address: Enter the address for connecting to the MySQL instance. IoTDA Enterprise edition instances can connect to MySQL using private network IP addresses, while Standard edition instances support only public network connection. For details, see Connection Management.
    • Database Name: Enter a database name. If no database exists, go to the RDS for MySQL console to create a database.
    • Access Account and Access Password: Access the MySQL console to obtain the account and password. For details, see Resetting a Password for a Database Account.
    • SSL: Select whether to connect to the database in SSL mode. You are advised to use the SSL mode. If not, security risks may exist during data transmission. To use the SSL mode, configure an SSL connection in the database instance first.
    • Table: Select the name of the table to which data is forwarded.
    • Field Mappings:
      • Forwarding Field: Enter the attribute name of the data to be forwarded. Data to be forwarded is in JSON format. Separate multi-level attribute names with periods (.). For details about the format of data to be forwarded, see Data Transfer APIs.
      • Target Field: Enter the column name of the database.

  5. Start a rule.

    After the rule is configured, click Enable Rule to start data forwarding.