All Products
Search
Document Center

ApsaraMQ for MQTT:Export data from ApsaraMQ for MQTT to other Alibaba Cloud services

Last Updated:Oct 16, 2023

You can configure data outbound rules for ApsaraMQ for MQTT to export data from ApsaraMQ for MQTT to other Alibaba Cloud services. This topic describes the working mechanism, scenarios, and limits of exporting data from ApsaraMQ for MQTT to other Alibaba Cloud services. This topic also describes the resource mappings between ApsaraMQ for MQTT and other Alibaba Cloud services.

Working mechanism

To export data from ApsaraMQ for MQTT to other Alibaba Cloud services, you must create data outbound rules. ApsaraMQ for MQTT uses data outbound rules to forward messages from ApsaraMQ for MQTT clients to other Alibaba Cloud services. This way, you can call APIs of the Alibaba Cloud services to obtain messages from the ApsaraMQ for MQTT clients.数据流出

Scenarios

Client data reporting

A large number of clients report their status data to ApsaraMQ for MQTT by using the MQTT protocol. After you configure a data outbound rule to map the topics of ApsaraMQ for MQTT and the topics of ApsaraMQ for RocketMQ, you can start the consumers of ApsaraMQ for RocketMQ in the backend service application to process the reported data.

Limits

Item

Limit

Description

Number of rules created on a single instance

100

If the default number of rules that you can create on an instance does not meet your business, join the DingTalk group 35228338 to contact the ApsaraMQ for MQTT technical support.

Rule deduplication

Only one rule of the same type can be created for each internal resource.

For example, you can create only one rule for client status notification for each group ID, and one data inbound rule and one data outbound rule for each topic in ApsaraMQ for MQTT.

Region

You cannot create rules across regions. The instances to which the data source and data destination in a rule belong must reside in the same region.

For example, if you create a data outbound rule in which the data source is specified as ApsaraMQ for MQTT in the China (Hangzhou) region, you can select only an ApsaraMQ for RocketMQ instance in the China (Hangzhou) region as the data destination.

ApsaraMQ for MQTT instance version

You can create rules for only instances whose kernel version is V3.x.x.

You can view the kernel version of an ApsaraMQ for MQTT instance in the instance list or on the Instance Details page in the ApsaraMQ for MQTT console.

ApsaraMQ for RocketMQ instance version

Only ApsaraMQ for RocketMQ 4.0 instances are supported.

When you exchange data between ApsaraMQ for MQTT and ApsaraMQ for RocketMQ by using a data inbound rule or a data outbound rule, you can use only ApsaraMQ for RocketMQ 4.0 instances.

Mapping methods

Data outbound rules allow you to map data based on the parent topics of ApsaraMQ for MQTT. You can export messages in a specific parent topic on ApsaraMQ for MQTT to a resource in another Alibaba Cloud service. Messages in subtopics on ApsaraMQ for MQTT are mapped to the message properties in ApsaraMQ for Apache RocketMQ.

Table 1. Mappings

ApsaraMQ for MQTT resource

Alibaba Cloud service

Resource of the Alibaba Cloud service

Packet definition

Topics on ApsaraMQ for MQTT

ApsaraMQ for RocketMQ

Topics on ApsaraMQ for RocketMQ

Message structure mappings between ApsaraMQ for MQTT and ApsaraMQ for RocketMQ

References

For information about operations in the console, see Manage data outbound rules.