This section describes how to manage rules for client status notification in the Message Queue for MQTT console.
Background information
When a Message Queue for MQTT client comes online or goes offline, the Message Queue
for MQTT broker pushes a client status notification to an Alibaba Cloud service based
on the rule that you configured. Backend service applications deployed on Elastic
Compute Service (ECS) instances can subscribe to client status notifications from
the Alibaba Cloud service to receive notifications when Message Queue for MQTT clients
come online or go offline. 

Limits
For more information, see Rule-related limits.
Create a rule for client status notification
Note For more information about the message structure mappings between Message Queue for MQTT and Message Queue for Apache RocketMQ, see Message structure mappings between Message Queue for MQTT and Message Queue for Apache RocketMQ.
Edit a rule for client status notification
- Log on to the Message Queue for MQTT console.
- In the left-side navigation pane, click Instances.
- In the top navigation bar, select the region where your instance is located.
- Find the instance for which you want to create a data outbound rule in the instance list. In the Actions column, choose .
- In the rule list, find the rule that you want to edit. In the Actions column, choose .
- On the Edit Rule page, you can change all parameter values except the rule ID.
- After you change parameter values as needed, click Save in the Configure Rule Destination step.
Delete a rule for client status notification
- Log on to the Message Queue for MQTT console.
- In the left-side navigation pane, click Instances.
- In the top navigation bar, select the region where your instance is located.
- Find the instance for which you want to create a data outbound rule in the instance list. In the Actions column, choose .
- In the rule list, find the rule that you want to delete. In the Actions column, choose .
- In the message that appears, click OK.
Enable a rule for client status notification
- Log on to the Message Queue for MQTT console.
- In the left-side navigation pane, click Instances.
- In the top navigation bar, select the region where your instance is located.
- Find the instance for which you want to create a data outbound rule in the instance list. In the Actions column, choose .
- In the rule list, find the rule that you want to enable. In the Actions column, choose .
- In the message that appears, click OK.
Disable a rule for client status notification
- Log on to the Message Queue for MQTT console.
- In the left-side navigation pane, click Instances.
- In the top navigation bar, select the region where your instance is located.
- Find the instance for which you want to create a data outbound rule in the instance list. In the Actions column, choose .
- In the rule list, find the rule that you want to disable. In the Actions column, choose .
- In the message that appears, click OK.