I did not used these before. Raspberry Pi OS APT has list of approved software that has taken time to validate for dependencies. Hence they lag behind the lastest version of Mosquitto and Python Paho client.
The bookworm RPi OS APT ‘recommends’ Mosquitto 2.0.11 and Python3-Paho-mqtt client version 1.6.1-1
Are these version of Broker and Client fitting each other? If not, which version to use? Can they support mqtt protocol 5, 3.11 or 3.1?
I used some youtube examples based of mqtt 3.x, obviously created under different software versions and might also wrongly mixed-up by me. I am using Python, RPi 5, 8GB RAM, RPi OS 64 bits with desktop, with sudo apt update and sudo apt upgrade.
My Python code run well if I put time.sleep(0.2) before publishing next message. Value higher or lower than 0.2 second make the code execute one time only or hangup after says 30 minutes. If I remove the time.sleep(0.2), it can process much higher number of message per second, but will hangup after tens of minutes.
Mosquitto has been very stable, no hangup. Just my Python code hangup.
Is this example fitting the above Broker and Client? https://cedalo.com/blog/configuring-paho-mqtt-python-client-with-examples/