For understanding Message Queue for MQTT The connection status of the client. You can specify the topic, group ID, and client ID to query the current number of online clients, the number of online clients within a specified period of time, and the connection information and subscription relationships.

By topic

You can specify the current online number of topic query clients.

  1. Log on to the Message Queue for MQTTconsole, select the region in the top navigation bar, for example, China East 1 (Hangzhou) .
  2. In the left-side navigation pane, choose Connection query cluster .
  3. On the Connection query , click the target instance, and then click Query by Topic tab.
  4. Click Parent Topic In the text box, select or enter the parent topic that you want to query, and click Child Topic Select or enter the child topic you want to query in the text box, and then click Query .

By group ID

You can specify the Group ID to query the number of online clients in a specified period of time.
  1. Log on to the Message Queue for MQTTconsole, select the region in the top navigation bar, for example, China East 1 (Hangzhou) .
  2. In the left-side navigation pane, choose Connection query cluster .
  3. On the Connection query , click the target instance, and then click Query by Group ID tab.
  4. Click Group ID In the text box, select or enter the group ID that you want to query. Date Select the time range to query, and click Query .
    Note The maximum span of the time range is 2 days.
    Note Statistics are collected by the distributed data collection component, which may result in delays and errors.

Query by Client ID

You can specify the Client ID to query the connection information and subscription relationship of the client.
  1. Log on to the Message Queue for MQTTconsole, select the region in the top navigation bar, for example, China East 1 (Hangzhou) .
  2. In the left-side navigation pane, choose Connection query cluster .
  3. On the Connection query , click the target instance, and then click Query by Client ID tab.
  4. Click Group ID , select or enter the ID of the group to be queried, and click Device ID In the text box, select or enter the Device ID that you want to query, and then click Query .
    Note The Client ID is made up of a group ID and a device ID.
    • Client ID : the ID of the client.
    • Is Online : indicates whether the client is currently online.
    • Client address : the IP address of the client.
    • Last update time : the last update time of the client.
    • Clean Session : indicates whether the client session is cleared. For more information, see cleanSession.
    • Topic : the message topic that the client subscribes to.
    • QoS : the service quality level of the message transmission between the client and the server. For more information, see QoS.