My default listener uses tls, when I enable an extra listener with mqtt protocol, things work fine. When I switch the protocol to websockets my broker slows down. I use mosquitto version 1.6.7.
Default listener
Default listener (with extra websocket listener enabled)
Also the startup logs of mosquitto are slower printed and connecting to the broker via mqtt-explorer is slower. Any idea what produces this issue?
So I cannot reproduce this on Windows. This seems having to do with our linux build, will look further into it. Do the linux binaries have websocket support enabled or is it just the windows installer?
Windows uses libwebsockets 2.4 which has proved to be a reliable version. Some of the later versions have had problems. I don't know what you have with your 1.6.7 install of course.
Would you mind trying out the develop branch of Mosquitto? There have been improvements to the websockets support in that branch and I think they are enough to fix what you are seeing for all libwebsockets versions.
Thx ralight! I will try it next week.
Thanks for the tip about libwebsockets!
I ran into this issue after enabling Mosquitto's websockets support on a Yocto Zeus -based embedded device. The device had Mosquitto 1.6.7 and libwebsockets 3.20.0 installed. I tried first upgrading to Mosquitto 1.6.12 from meta-oe master, but that didn't help. Then I found this ticket and after upgrading to libwebsockets 4.0.20, also from meta-oe master, the laggy behavior vanished.
Hey, thanks @jpnurmi for your solution. It fixed it for us too :)
Most helpful comment
Windows uses libwebsockets 2.4 which has proved to be a reliable version. Some of the later versions have had problems. I don't know what you have with your 1.6.7 install of course.
Would you mind trying out the
developbranch of Mosquitto? There have been improvements to the websockets support in that branch and I think they are enough to fix what you are seeing for all libwebsockets versions.