I’m confused why this post is on the front page of HN. This isn’t new and they haven’t done a new release or something. Mosquitto is good and used all over the place but not sure why this is being posted.
I'm the OP - I just stumbled upon this project because I setup a self hosted MQTT server to read/write to/from a small PDU. Mosquitto worked great for that!
I hadn't heard of it, and thought to share it here. I'm not sure why people are upvoting it - but it's not impossible that others are interested in this topic as well..! Cheers
Maybe NanoMQ 0.25, Rabbitmq 4.4, EMQX 6.3 or VerneMQ 2.2 would have been a bit more newsworthy. Mosquito seems to the rather boring but but stable reference for MQTT for years now.
Now the default seems to be EMQX, there's also a possible project to include MQTT5 compatibility in NATS (but they push back because they are selling this in their Entreprise version), what stack do people use here for MQTT?
We use HiveMQ and some mosquito. Rabbitmq did not have good qos2 support. I would like to see more options in this space. Mosquito did not have good cluster support from my perspective.
Since we are into it, just sharing then: I had a lot of success with RabbitMQ + it's MQTT plugin. AFAIK, it actually has the MQTT plugin now baked in by default. Never had any issue at scale, plus you get AMQP in your stack, and you can actually use AMQP to consume the messages originally received over MQTT.
I had a terrible time with a cluster of RabbitMQ servers, the cluster was partitioning often, impacting the application. It seemed like it was very sensitive to transient network problems.
At the end we moved from a cluster to a single instance running on a over provisioned machine, that worked pretty well.
At a previous job (many years ago) we used to run RabbitMQ. I hadn't configured it originally, but I was certainly left with it in pieces when it entered split-brain mode in the face of some bizarre network failure.
So we had our application talking to two nodes of a cluster, both working normally without talking to each other (nevermind the fact that the connectivity between the machines was fine). Some workers picked up jobs, others didn't. IIRC the app read requests from a queue and wrote replies to another one, so we'd have half of the jobs being picked up, and then half of the replies not being picked up (ergo, 75% of the requests failed). It was bizarre and nothing seemed to indicate there were issues with RabbitMQ itself. I don't even remember how we figured it out at the time.
It's been nearly 10 years, I'm sure that it's better, that I was inexperienced, that the original setup wasn't great. But that left me so sore on it that I have actively avoid it ever since.
Bonus points for having dealt with this while Django Celery apparently had two independent configuration mechanisms, and both were being used in this app. Fun times.
The distribution story is radically different on modern RabbitMQ, they have quorum queues based on the Raft protocol that are very solid. What you deal with is probably mirror queues, which did have ugly split brain failure modes. Those were removed about 4 years ago.
brokerless is nice niche for when you have pretty constrained use case but just not traversing network well (zmq requires multipath for any sensible patterns) already roots many use cases out, as is the authentication
Depends on the task. For one-to-one comms you could use zmq, but if you need one-to-many, mqtt is a lot better. Mqtt also scales nicely after the fact, as you can hook additional services in without disrupting what's already in place.
I've used this for quite a while as a gateway for sparkplugB such that things like ignition can pull our telemetry data (we do agtech monitoring, smart meters, power, water, soil moisture, temp, etc etc)
Oh boy. You're going to hate to know what programming language is used for apache, nginx, postfix, postgres, MySQL/mariadb, redis, wireguard and the majority of network hardware.
Shameless plug I've implemented https://github.com/maxpert/strangeq with AMQP and plan to integrate MQTT as supported protocol for StrangeQ. Right now I was focused on really optimizing the implementation itself (which I did), MQTT + replication/distribution is next on my list.
26 comments
[ 0.21 ms ] story [ 23.4 ms ] threadI hadn't heard of it, and thought to share it here. I'm not sure why people are upvoting it - but it's not impossible that others are interested in this topic as well..! Cheers
At the end we moved from a cluster to a single instance running on a over provisioned machine, that worked pretty well.
So we had our application talking to two nodes of a cluster, both working normally without talking to each other (nevermind the fact that the connectivity between the machines was fine). Some workers picked up jobs, others didn't. IIRC the app read requests from a queue and wrote replies to another one, so we'd have half of the jobs being picked up, and then half of the replies not being picked up (ergo, 75% of the requests failed). It was bizarre and nothing seemed to indicate there were issues with RabbitMQ itself. I don't even remember how we figured it out at the time.
It's been nearly 10 years, I'm sure that it's better, that I was inexperienced, that the original setup wasn't great. But that left me so sore on it that I have actively avoid it ever since.
Bonus points for having dealt with this while Django Celery apparently had two independent configuration mechanisms, and both were being used in this app. Fun times.
brokerless is nice niche for when you have pretty constrained use case but just not traversing network well (zmq requires multipath for any sensible patterns) already roots many use cases out, as is the authentication
I looked at MQTT options earlier last year, and the best one was Mochi ( https://github.com/mochi-mqtt/server ), written in Go.
I added TLS support with Let's Encrypt provisioning to it: https://github.com/Cyberax/lenc-mochi
i picked mosquitto but had to ditch it for AWS IoT Core and have not looked back.