Updated on 2023-10-18 GMT+08:00

Overview

Subscription: AMQP is short for Advanced Message Queuing Protocol. You can create a subscription task on the IoTDA console. You can call platform APIs Creating a Rule Triggering Condition, Creating a Rule Action, and Modifying a Rule Triggering Condition to configure and activate rules for obtaining changed device service details and management details. (Service details include device lifecycle management, device data reporting, device message status, and device status. Management details include software/firmware upgrade status and result.) The AMQP message channel must be specified during subscription creation.

Push: After a subscription is created, the platform pushes the corresponding change to the specified AMQP message queue based on the type of data subscribed. If an application does not subscribe to a specific type of data notification, the platform does not push the data to the application even if the data has changed. You can use the AMQP client to establish a connection with the platform to receive data. The figure below shows the subscription and push process.

Push mechanism: After receiving a message from the platform, the application returns a response. (The automatic response mode is recommended.) If the application does not pull data after the connection is established, data will be stacked on the server. The server stores only the data that is received in the last 24 hours and occupies less than 1 GB disk space. If the application does not pull data in a timely manner, the platform clears expired and excess data on a rolling basis. If the application does not respond in time after receiving the message and the persistent connection is interrupted, the corresponding data will be pushed again in the next connection established.

Subscribing to Data

After connecting to IoTDA, an application calls an API to subscribe to data.

Format of Pushed Data

For details on the format of data pushed by the platform to applications after data subscription is created, see Data Transfer APIs.

In the HTTP message header, the value of Content-Type is application/json, and the character set is UTF-8.