This topic describes how to query the online status, subscriptions, connection history, and messages of a specified device in the console. When an exception occurs on a device or messages are not sent or received as expected, you can use this feature to obtain the status information of the Message Queue for MQTT client. Based on the status information, you can locate the exception and identify the cause of the exception.

  1. Log on to the Message Queue for MQTT console.
  2. In the left-side navigation pane, click Instances.
  3. In the top navigation bar, select a region.
  4. Find the instance on which you want to query the status of a device in the instance list. In the Actions column, choose More > Device Status Query.
  5. On the Device Status Query page, set the Group ID and Device ID parameters and click Search.
    Parameter Description
    Device Status
    Client ID The ID of the client.
    Status The online status of the client.
    • 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 in 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 Message Queue for MQTT.
    Subtopic The subtopic to which the client subscribes. A subtopic is a level 2 or level 3 topic in Message Queue for MQTT.
    QoS The quality of service (QoS) level in message transmission between the client and the server. For more information, see the "QoS" section of the Terms topic.
    On the query results page, click the Device Trace and Message Trace tabs. You can view the device traces and messages of the specified device on each tab. For more information about the parameters and parameter description on each tab, see Query the connection history of a device and Query the message traces.