You can use the data forwarding feature of rules engine to send messages from devices to IoT Platform. The messages are then processed by rule SQLs, forwarded to consumer groups that AMQP clients listen to.

Create consumer groups

  1. Log on to the IoT Platform console.
  2. In the left-side navigation pane, choose Rules > Service Subscription.
  3. On the Service Subscription page, choose Consumer Groups > Create Consumer Group.
  4. In the Create Consumer Group dialog box that appears, enter a group name and click OK.
    The consumer group name can contain letters, digits, and underscores (_). It can be 4 to 30 characters in length.
    After a consumer group is created, you can add a data forwarding operation and forward data to the consumer group.

Create data forwarding operations

Before you create a data forwarding operation, you must create a data forwarding rule and write a rule SQL for data processing. For more information, see Configure data forwarding rules.

  1. On the Data Forwarding page, find the rule and click View.
  2. In the Data Forwarding section of the Data Forwarding Rule page, click Add Operation.
  3. Select Publish to AMQP Subscribed Consumer Group, select the target consumer group, and then click OK.

Configure the AMQP client to consume messages

After the data is forwarded to the AMQP consumer group, your server can consume messages through AMQP clients. For more information about how to develop an AMQP client, see AMQP client access instructions.

For sample codes of the AMQP clients, see:

Java SDK access example

Node.js SDK access example

.NET SDK access example

Python SDK access example

Go SDK access example