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
- Log on to the IoT Platform console.
- In the left-side navigation pane, choose .
- On the Service Subscription page, choose .
- 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.
- On the Data Forwarding page, find the rule and click View.
- In the Data Forwarding section of the Data Forwarding Rule page, click Add Operation.
- 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: