This topic describes how to manage client status notification rules in the Message Queue for MQTT console.

Create a client status notification 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, choose Rules > Create Rule.
  3. On the Create Rule panel, click the Online/Offline Notification tab.
  4. On the Online/Offline Notification 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
    Instance Group
    Group ID GID_Client_Status Specifies the device group from which data is exported. For more information about group IDs, see Terms.
    Notification
    Note Only Message Queue for Apache RocketMQ is supported.
    Cloud Service Message Queue for Apache RocketMQ Specifies the target cloud service to which the client status notifications are forwarded. The value is Message Queue for Apache RocketMQ.
    Instance ID MQ_INST_13801563067*****_BbyOD2jQ The ID of the instance from the target cloud service, that is, the ID of the Message Queue for Apache RocketMQ instance.
    Topic Topic_test The resource key of the target cloud service, that is, the topic of Message Queue for Apache RocketMQ. If the value is set to Topic_set, the status notifications of Message Queue for MQTT clients are forwarded to to the Topic_test topic.
    You can view the client status notification rule you create in the rule list of Rules.

Edit a client status notification 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 client status 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 client status notification 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 client status notification rule that you want to delete, and click Delete in the Actions column.
  4. In the dialog box that appears, click OK.

Disable a client status notification 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 client status notification rule that you want to disable, and click Disable in the Actions column.
  4. In the dialog box that appears, click OK.

Enable a client status notification 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 client status notification that you want to enable, and click Enable in the Actions column.