View topic subscriptions for a device

Updated at:

After a device connects to IoT Platform and goes online, it can receive messages from its subscribed topics. You can view these topics in the IoT Platform console.

Prerequisites

The device must be connected to IoT Platform with the topic subscription feature implemented. For more information, see Download a device SDK.

You can also use one of the following methods to simulate a device subscribing to a topic for which it has Subscribe permission.

  • Start the device simulator: After a device is online, IoT Platform automatically subscribes to the basic communication topics and TSL communication topics for the device that have subscription permissions. You can also use the Custom Topics' Debug Uplink Commands feature to subscribe to custom topics.

  • Use MQTT.fx to simulate a device connection to IoT Platform: After the device is online, you can use the Subscribe feature to subscribe to device topics.

  • SubscribeTopic: After a simulated or developed device connects to IoT Platform and comes online, you can call this API operation to subscribe to a topic.

Background information

For more information about device topics, see What is a topic?.

For MQTT topics used for communication:

  • MQTT 3.1.1 and 3.1 protocols: A device's topic subscriptions are permanent, so you can view the subscribed topics in the IoT Platform console regardless of whether the device is online, offline, or has re-established a connection.

  • MQTT 5.0 protocol: Topic subscriptions follow the protocol standard. The list of subscribed topics for a device is determined by the session expiry settings in MQTT 5.0.

    For more information, see Session expiry.

    cleanStart value

    Session expiry interval value

    Session description

    0

    0

    Clears the current session state when the device disconnects.

    0 to 0xFFFFFFFF

    Clears the current session state when the session expires.

    0xFFFFFFFF

    The session state persists unless a new state is specified during the next connection.

    1

    0

    • Clears the old session state when a new connection is established.

    • Clears the current session state when the device disconnects.

    0 to 0xFFFFFFFF

    • Clears the old session state when a new connection is established.

    • Clears the current session state when the session expires.

    0xFFFFFFFF

    • Clears the old session state when a new connection is established.

    • The session state persists unless a new state is specified during the next connection.

Procedure

  1. Log on to the IoT Platform console.

  2. On the Overview page, find the instance that you want to manage and click the instance ID or instance name.

  3. In the left-side navigation pane, choose Devices>Devices.

  4. In the device list, find the target device and click View in the Actions column.

  5. On the Device Details page, click the Topic List tab to view the device's subscribed topics. Click Send in the Actions column to send a message to a custom topic.

    The list of subscribed topics includes system topics for features such as property settings (thing/service/property/set), device information (thing/deviceinfo/update_reply, thing/deviceinfo/delete_reply), sub-device registration (thing/sub/register_reply), topology relationships (thing/topo/add_reply, thing/topo/delete_reply, thing/topo/get_reply), configuration pushes (thing/config/push), event reporting replies (thing/event/+/post_reply), and the device shadow (shadow/get).