mosquitto
mosquitto copied to clipboard
1.5.8 max_queued_bytes and max_inflight_bytes unexpected behaviour
Context
mosquitto version 1.5.8 running on a docker container: https://hub.docker.com/layers/eclipse-mosquitto/library/eclipse-mosquitto/1.5.8/images/sha256-6e8fb0e118f09f24e7d51ab2397f6bad4545f320cec4484068b98acfec851398?context=explore Tests were performed with generic paho mqtt python package. The mqtt broker contained 12k messages retained.
First test: wrong behaviour
max_inflight_bytes 100000000
max_inflight_messages 1000
max_queued_messages 1000000
max_queued_bytes 1000000000
Results
After connecting the broker and subscribing the retained messages. the client only received 1000 messages. It corresponds to the max_inflight_messages configuration. This number was changed and matches the results.
First test: correct behaviour
max_inflight_bytes 0
max_inflight_messages 1000
max_queued_messages 1000000
max_queued_bytes 0
Results
After connecting the broker and subscribing the retained messages. the client received all 12k messages in batches of 1000.