This topic provides answers to some commonly asked questions about the ApsaraMQ for MQTT console.

What is the maximum time range in which CloudMonitor can query metrics?

ApsaraMQ for MQTT CloudMonitor supports queries for metrics in the previous 3 days.

Why does the device remain connected in the console after the device is power off?

ApsaraMQ for MQTT checks the heartbeat of the client on a regular basis. If the system does not detect a heartbeat in the client after the specified time period elapses, the system disconnects. The specified duration is calculated based on the following formula: Specified duration = 1.5 × keepalive time.

For example, if the default keepalive time is 90 seconds, the system disconnects after 135 seconds. Heartbeat detection is not a real-time detection capability, a longer period of time than 135 seconds may be required for the system to detect that the heartbeat timed out. In this case, the system also requires a longer period of time to disconnect.

How do I modify subscriptions in the console?

Subscriptions are specified in the SDK code that is used to subscribe to messages and can only be queried in the console.

Why am I unable to query the consumption traces of offline messages in the console?

If the offline messages feature is not configured, the broker does not push messages when the client is disconnected and cannot receive messages that are produced during disconnection when the client reconnects.

If the offline messages feature is required, set the cleanSession parameter to false and the QoS parameter to 1. For more information, see Combinations of QoS levels and the cleanSession parameter

Why am I unable to consume some messages if the message traces in the console indicate that the messages are sent?

Possible cause: When the broker pushes messages, the client is disconnected and the offline messages feature is not configured. In this case, you cannot consume the messages that are produced during disconnection.