For more information Message Queue for MQTTyou can specify a Topic, Group ID, or Client ID to query the current connected MQTT clients, connected MQTT clients in a specified period, connection information, and subscriptions.

Query by topic

You can specify a topic to query the current connected MQTT clients.

  1. Login Message Queue for MQTTconsole in the top navigation bar, select a region to query, such as china (Hangzhou).
  2. In the left-side navigation pane, choose Connections.
  3. On the Connections page, click the Search by Topic tab.
  4. Enter a parent topic in the Parent Topic field and enter a subtopic in the Subtopic field. Then click Search.
    The search result is shown in the following figure.topic_result

Query by group ID

You can specify a group ID to query the connected MQTT clients in a specified period.
  1. Login Message Queue for MQTTconsole in the top navigation bar, select a region to query, such as china (Hangzhou).
  2. In the left-side navigation pane, choose Connections.
  3. On the Connections page, click the Search by Group ID tab.
  4. Enter a group ID in the Group ID field, and set a time range in the Date picker. Then click Search.
    Note The maximum time span is two days.

    The search result is shown in the following figure.

    groupid_result
    Note Statistics are collected by the distributed data collection component, which may result in delays and errors.

Query by client ID

You can specify an MQTT client ID to query the connection information and subscription information of an MQTT client.
  1. Login Message Queue for MQTTconsole in the top navigation bar, select a region to query, such as china (Hangzhou).
  2. In the left-side navigation pane, choose Connections.
  3. On the Connections page, click the Search by Client ID tab.
  4. Enter a group ID in the Group ID field and enter an MQTT client ID in the Client ID field. Then click Search.
    Note A Client ID consists of a Group ID and a Device ID.

    The search result is shown in the following figure.

    clientid_result
    • Client ID: The ID of the MQTT client.
    • Connected or Not: Specifies whether the MQTT client is connected or not.
    • Client Address: The IP address of the MQTT client.
    • Last Update Time: The last update time of the MQTT client.
    • Clean Session: Specifies whether the cleanSession parameter is set. For more information, see cleanSession.
    • Topic: The topic of the message that the MQTT client subscribes to.
    • QoS: The quality of service (QoS) for message transmission between the MQTT client and MQTT broker. For more information, see QoS.