To simplify the offline message fetching mechanism, Message Queue for MQTT after the connection to a client is established and the system passes the authentication, the offline messages are automatically loaded and delivered to the client.
- After the MQTT client establishes a connection, it must pass the permission verification to automatically load offline messages. For example, if you use token verification for an MQTT client, you must upload the token and the MQTT client must pass the verification before it can receive offline messages.
- An offline message takes some time to generate, because the pushed message can be judged as an offline message after the MQTT client acknowledgement times out. Therefore, if the MQTT client experiences transient disconnection and reconnection, you may not be able to obtain the offline notification message immediately. The latency is generally 5 to 10 seconds.
- If you have too many offline messages, that is, more than 30 messages, Message Queue for MQTT the system sends offline messages in batches (once every 5 seconds, 30 at a time).
You need to set QoS and cleanSession two parameters are used to determine whether to obtain offline messages. For more information, see Terms.