Greetings! We’re thrilled to have you here, showing interest in MQTT and the HiveMQ broker. Welcome to the HiveMQ Community! We’re always happy to see new users.
During the period between the time you refreshed the browser and the moment the second screenshot was taken, the RPi MQTT client did not publish any new messages to the specific topic that the Web Client is subscribed to. This explains the absence of new messages in the list of received messages after you refresh the browser.
I hope this information provides clarity on the matter. If you have any further questions or require additional assistance, please don’t hesitate to reach out. We’re here to help in any way we can.
Thanks for the prompt reply. Unfortunutely, that is not the case.
Please pay attantion to topic called “R_pico_w/P_Say”. I count how many times pico publishs with that.
In below example, I published every 30 seecends. When I disconnect after publish number 22, when I reconnect, I cannot see data before publish number 30.
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.