You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem only exists when connecting/subscribing after the messages have been published, i.e. when the broker delivers the retained messages. When the client is already subscribed while publishing, it works normally.
I was able to reproduce it on a Ubuntu 22.04 machine with mosquitto 2.0.11, on Ubuntu 24.04 with mosquitto 2.0.18 and still experiencing it with 2.0.20 from mosquitto-ppa on a fresh Ubuntu 24.04 VM.
After publishing the messages, I connect mosquitto_sub over TCP and everything is delivered as expected with log:
1740761663: New connection from 127.0.0.1:40418 on port 1883.
1740761663: New client connected from 127.0.0.1:40418 as auto-5644E03B-6044-F541-7F7F-8901E2E4B862 (p2, c1, k60).
1740761665: Client auto-5644E03B-6044-F541-7F7F-8901E2E4B862 disconnected.
Then, when connectiong over unix socket, I'm receiving only ~1500 of the retained messages with log:
1740761680: New connection from /tmp/mosquitto.sock:0 on port 0.
1740761680: New client connected from /tmp/mosquitto.sock:0 as auto-D299BB41-637E-6CFC-1FDF-2717F9681972 (p2, c1, k60).
1740761680: Outgoing messages are being dropped for client auto-D299BB41-637E-6CFC-1FDF-2717F9681972.
1740761682: Client auto-D299BB41-637E-6CFC-1FDF-2717F9681972 disconnected
When i set max_queued_messages 6000, it works as expected, but as far as I know, message queuing only applies to QoS 1+2 and not for retained messages.
Mosquitto doesn't deliver all retained messages when connected via unix socket.
Tested with Mosquitto 2.0.20 with config
Publish 5000 retained messages:
Connection over TCP works as expected:
mosquitto_sub -h 127.0.0.1 -t "test/#"
Output:
But with
mosquitto_sub --unix /tmp/mosquitto.sock -t "test/#"
Output:
with mosquitto.log entry
Outgoing messages are being dropped for client auto-C7D5C72D-ECFE-F6F4-AB79-0FDAC37A8969.
There should be no difference in message handling between connection types.
The text was updated successfully, but these errors were encountered: