This topic describes how to manage data inbound rules in the Message Queue for MQTT console.

Create a data inbound rule

For more information about rule limits, see Limits.

  1. Log on to the Message Queue for MQTT console. In the top navigation bar, select the region where the instance is located.
  2. In the left-side navigation pane, choose Rules > Create Rule.
  3. On the Create Rule panel, click the Data Inflow tab.
  4. On the Create Rule panel, click the Data Inflow tab.
  5. On the Data Inflow tab, set the following parameters as prompted, and click OK.
    Parameter Example value Description
    Rule ID 111111 The global unique identifier of a rule.
    • It can contain only letters, digits, hyphens (-), and underscores (_) and must contain at least one letter or digit.
    • It must be 3 to 64 characters in length, and excessive characters will be automatically truncated.
    • It cannot be updated after the rule is created.
    Rule Description migrate from rocketmq The description of the rule.
    Status Enable Specifies whether to enable the current rule. Valid values:
    • Enable
    • Disable
    Data Source
    Note Only Message Queue for Apache RocketMQ is supported.
    Cloud Service Message Queue for Apache RocketMQ Specifies the source cloud service whose data flows to Message Queue for MQTT.
    Instance ID MQ_INST_13801563067*****_BbyOD2jQ The ID of the instance from the source cloud service.
    Topic Topic_test The resource key of the specified source cloud service, that is, the topic of Message Queue for Apache RocketMQ. The value Topic_test indicates that data from the Topic_test topic is forwarded to the target topic of the Message Queue for MQTT instance.
    Flow Destination
    Topic TopicA Specifies the target topic of Message Queue for MQTT to which data from other source cloud services is imported.
    You can view the data inbound rule you create in the rule list of Rules.

Edit a data inbound rule

  1. Log on to the Message Queue for MQTT console. In the top navigation bar, select the region where the instance is located.
  2. In the left-side navigation pane, click Rules.
  3. In the rule list, find the data inbound rule that you want to edit, and click Details in the Actions column.
  4. In the upper-right corner of the rule details page, click Edit.
  5. On the Edit Rule panel, you can update all the parameters except the rule ID and rule type.
  6. Click OK.

Delete a data inbound rule

  1. Log on to the Message Queue for MQTT console. In the top navigation bar, select the region where the instance is located.
  2. In the left-side navigation pane, click Rules.
  3. In the rule list, find the data inbound rule that you want to delete, and click Delete in the Actions column.
  4. In the dialog box that appears, click OK.

Disable a data inbound rule

  1. Log on to the Message Queue for MQTT console. In the top navigation bar, select the region where the instance is located.
  2. In the left-side navigation pane, click Rules.
  3. In the rule list, find the data inbound rule that you want to disable, and click Disable in the Actions column.
  4. In the dialog box that appears, click OK.

Enable a data inbound rule

  1. Log on to the Message Queue for MQTT console. In the top navigation bar, select the region where the instance is located.
  2. In the left-side navigation pane, click Rules.
  3. In the rule list, find the data inbound rule that you want to enable, and click Enable in the Actions column.