Hello,
I've a RUT955 with FW 00.06.07.4, and I'm using the Internal MQTT broker on port 1883, configured in bridging mode versus an external remote broker for some MQTT topics. The MQTT bridge is configured with QoS 2 and Clean Session false. With this setup everything works very well, also in cases of network down periods, the MQTT broker republish the messages that it saved internally with QoS 2 and I correctly receive them on the remote broker. But I've some questions:
- What is the maximum Queue for MQTT messages to send to the bridge? From my tests, the maximum default queue message with QoS 2 is limited to 100 messages, correct?
- There is any chance to increase this limit? I need to have more buffer in this specific case beacause there are some long network down periods. From my test, I've correctly changed the mosquitto.conf file adding the max_queued_messages with a value of 256. Then, starting mosquitto from CLI with mosquitto -c mosquitto.conf (for testing it), the config file is read properly and the MQTT broker bridge queue growed from 100 to 256 messages, but if i publish 256 messages without network connection, at the moment of reconnection of the bridge, only about 150 messages (sometimes 152, sometimes 150) are sent (more than 100, obvious, but not 256 as specified in the .conf...). From what I know, there is also a memory_limit value in the mosquitto.conf that can be added. From the tests, the RAM usage of mosquitto was about 1.5mb with queue empty, and 2.5-3mb with queue full of 150 messages, it won't go over if I publish other messages for reaching 256 limit, so it seems to be a max RAM allocation problem. Router RAM is about 80% free, so if there is a way to increase "mosquitto dedicated RAM", it will be a possible solution (if this is the problem, from what I think and from my tests).
Thanks in advance for every answer