Operation Background
Due to the overlap in features between the message queue and the Rule Engine, the platform will discontinue the message queue feature. This document guides existing users on migrating from the message queue to the Rule Engine.
Operations
1. Log in to the IoT Hub console and click View details on the upper right of the Overview module. You will be directed to the Product List homepage by default.
2. On the Product List page, click the message queue to view the configured information.
Message Queue CMQ: Refer to the Rule Engine configuration rules and modify them to use Data Forwarding to TDMQ in the Rule Engine.
Refer to the rule engine configuration rules, modify to use the rule engine for Data Forwarding to CKafka.
3. Due to the configuration of the message queue features CMQ and CKafka, and the configuration of rule engine forwarding, the data format received by the customer's business platform is different, requiring the customer to make the following modifications to the server-side program.
4. After the server-side verification is successful, delete the configuration information in the message queue feature.
Modifications
Due to the different data formats received by the customer's business platform when using message queue feature forwarding and rule engine feature forwarding, follow the instructions below for modifications.
Device-reported message
Data format for message queue feature forwarding:
{MsgType: "Publish",Topic: topic,Seq: Equivalent to the reported mid,PayloadLen: payload length,Payload: payload content,ProductId: product id,DeviceName: Device name}
The data format forwarded by the rule engine function, refer to the rule engine forwarding to CKafka.
Modification point: Since the values of the MsgType field in the data received by the customer business platform forwarded by the two methods are different, if the customer business platform uses the MsgType field, it needs to be modified.
Device status change notification
Data format for message queue feature forwarding:
{MsgType: "StatusChange",Topic: topic,Seq: Equivalent to the reported mid,PayloadLen: 0,Payload: "",ProductId: product id,DeviceName: Device nameEvent: Device online status, values are Online and Offline}
The data format forwarded by the rule engine function, refer to the rule engine forwarding to CKafka.
Modification points:
The value of the MsgType field is different. If the customer's business platform uses the MsgType field, it needs to be modified.
The values of the device online status are different. The message queue feature obtains the device status from the Event field, but the rule engine feature needs to obtain the device status from the Payload. For data parsing in the Payload, refer to the rule engine forward to CKafka.