All Products
Search
Document Center

ApsaraMQ for MQTT:Query the status of a device

Last Updated:Feb 06, 2024

If an exception occurs in an ApsaraMQ for MQTT device or messages cannot be sent or received as expected, you can use the message status query feature to query the status, subscriptions, connection history, and message list of the device. This helps you quickly identify the cause of the issue.

Procedure

  1. Log on to the ApsaraMQ for MQTT console. In the left-side navigation pane, click Instances.

  2. In the top navigation bar, select the region where the instance that you want to manage resides. On the Instances page, click the instance name to go to the Instance Details page.

  3. On the Instances page, find the instance that you want to manage and choose More > Device Status Query in the Actions column.

  4. On the Device Status Query page, configure the Group ID and Device ID parameters and click Search.

    The following table describes the fields in the query result.

    Field

    Description

    Device status

    Client ID

    The client ID.

    Status

    The client status. Valid values:

    • Online

    • Offline

    Client Address

    The IP address of the client.

    cleanSession

    Indicates whether the previous subscriptions and offline messages are cleaned up. For more information, see the "cleanSession" section of the Terms topic.

    Last Updated At

    The time when the client status was last updated.

    Subscription

    Parent Topic

    The parent topic to which the client subscribes. A parent topic is a level 1 topic in ApsaraMQ for MQTT.

    Subtopic

    The subtopic to which the client subscribes. A subtopic is a level-2 topic or level-3 topic in ApsaraMQ for MQTT.

    QoS

    The quality of service (QoS) level in message transmission between the client and the broker. For more information, see Combinations of QoS levels and the cleanSession parameter.

    On the query result page, you can also click the Device Trace and Message Trace tabs to view the connection history and message list of the device. For information about the parameters and parameter description on each tab, see Query the connection history of a device and Query message traces.

References

For information about how to query the connection history of a device, see Query the connection history of a device.