Hi @aeren,
Why you are not seeing messages 23-29 in the received message list? Because the MQTT broker stores messages in a queue only for clients that have a persistent session with the broker. A persistent session is created when the client sets “cleanStart=false
” and “sessionExpiry > 0
” while connecting to the broker. Additionally, the messages should have a quality of service (QoS) level of 1 or 2.
In your case, the Web Client always creates a clean session, because it is a simple demo client and has limited options. To observe messages queued, you’ll need to use a different MQTT client that provides more connection options.
One client we can suggest is the HiveMQ MQTT CLI command line client, which you can find here: Home - HiveMQ MQTT Client.
If you need guidance on how to create a persistent session with MQTT CLI, please refer to this link: Persistant Session & Queuing Message, Session Expiry - #9 by Daria_H.
For more in-depth information about persistent sessions, you can check out this article: Understanding Persistent Sessions and Clean Sessions – MQTT Essentials: Part 7.
I hope this information proves helpful to you. If you have any further questions or require additional assistance, please don’t hesitate to ask.
Best regards,
Dasha from the HiveMQ Team