All Products
Search
Document Center

ApsaraMQ for MQTT:Query by connection

Last Updated:Aug 30, 2024

If you want to know the connection status of an ApsaraMQ for MQTT client, you can specify the topic, group ID, or client ID to query the current connected clients, connected clients in a specific period of time, connection information, and subscriptions.

Query by topic

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

  1. Log on to the ApsaraMQ for MQTT console. In the top navigation bar, select the region where you want to query the connected ApsaraMQ for MQTT clients. Example: China (Hangzhou).

  2. In the left-side navigation pane, click Connections.

  3. On the Connections page, click the Search by Topic tab.

  4. In the Parent Topic field, enter the parent topic name or select the parent topic from the drop-down list. In the Subtopic field, enter the subtopic name or select the subtopic from the drop-down list. Then, click Search.

Query by group ID

You can specify a group ID to query the connected ApsaraMQ for MQTT clients in a specific period.

  1. Log on to the ApsaraMQ for MQTT console. In the top navigation bar, select the region where you want to query the connected ApsaraMQ for MQTT clients in a specific period. Example: China (Hangzhou).

  2. In the left-side navigation pane, click Connections.

  3. On the Connections page, click the Search by Group ID tab.

  4. In the Group ID field, enter the group ID or select the group ID from the drop-down list. In the Date picker, set the time range. Then, click Search.

    Note

    The maximum time span is two 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 an ApsaraMQ for MQTT client ID to query the connection information and subscriptions of an ApsaraMQ for MQTT client.

  1. Log on to the ApsaraMQ for MQTT console. In the top navigation bar, select the region where you want to query the connected ApsaraMQ for MQTT clients. Example: China (Hangzhou).

  2. In the left-side navigation pane, click Connections.

  3. On the Connections page, click the Search by Client ID tab.

  4. In the Group ID field, enter the group ID or select the group ID from the drop-down list. In the Device ID field, enter the device ID or select the device ID from the drop-down list. Then, click Search.

    Note

    A client ID consists of a group ID and a device ID.

    • Client ID: the ID of the ApsaraMQ for MQTT client.

    • Connected or Not: indicates whether the ApsaraMQ for MQTT client is connected.

    • Client Address: the IP address of the ApsaraMQ for MQTT client.

    • Last Update Time: the time when the ApsaraMQ for MQTT client was last updated.

    • Clean Session: indicates whether the sessions of the ApsaraMQ for MQTT client are cleaned. For more information, see cleanSession.

    • Topic: the topic to which the ApsaraMQ for MQTT client subscribes.

    • QoS: the quality of service (QoS) level in message transmission between the client and the broker. For more information, see QoS.