~/tools/mosquitto
Eclipse Mosquitto
tool

Eclipse Mosquitto

Eclipse Mosquitto is an open source MQTT message broker you can self-host — a lightweight AWS IoT Core and Azure IoT Hub alternative that connects sensors, devices, and apps over pub/sub, small enough to run on a Raspberry Pi.

What is Eclipse Mosquitto?

Eclipse Mosquitto is an open source MQTT message broker that routes publish/subscribe messages between devices and applications. It implements MQTT 5.0, 3.1.1, and 3.1, and is deliberately lightweight — a single C process with roughly a 3 MB memory footprint — so it runs on everything from cloud servers down to a Raspberry Pi or embedded gateway.

What is Eclipse Mosquitto best for?

Mosquitto is best for IoT and telemetry: connecting sensors, mobile devices, and embedded hardware to your backend over the low-bandwidth MQTT protocol. It suits edge and small-to-mid deployments where a tiny, dependable broker matters more than a multi-node cluster — home automation, industrial edge gateways, prototypes, and single-broker production workloads.

What can Eclipse Mosquitto do?

  • Speak MQTT 5.0, 3.1.1, and 3.1, with all three Quality of Service levels (0, 1, 2) for delivery guarantees.
  • Secure connections with TLS/SSL, plus username/password auth, client certificates, and a dynamic security plugin for role-based access control.
  • Enforce per-topic access control lists (read, write, readwrite, or deny) so clients only touch the topics they should.
  • Bridge broker-to-broker, forwarding topics to another Mosquitto or remote MQTT broker — the standard way to fan messages between edge and cloud.
  • Carry MQTT over WebSockets so browsers and web apps can subscribe directly.
  • Persist connection, subscription, and message state to disk so retained messages and queued QoS survive a restart.
  • Ship with mosquitto_pub, mosquitto_sub, mosquitto_passwd, and mosquitto_ctrl command-line tools, plus a C/C++ client library.

Where does Eclipse Mosquitto fall short?

  • No native clustering in the open source edition. A single broker is a single point of failure; horizontal scale and high availability require external load balancers and shared storage, or the commercial Pro Mosquitto from Cedalo. Brokers like EMQX and HiveMQ build clustering in.
  • MQTT only. Unlike RabbitMQ (AMQP, STOMP, MQTT) or NATS, Mosquitto speaks one protocol. If you need queues, streaming, or multi-protocol routing it is the wrong tool — pair it with, or replace it by, a general-purpose broker.
  • No built-in message stream/history. It is a real-time pub/sub broker, not an event log; there is no replay of past messages like Apache Kafka offers. Consumers only get retained messages and whatever their QoS session queued.

Is Eclipse Mosquitto free?

Yes — Mosquitto is fully free and open source under EPL-2.0 or the BSD-3-Clause EDL, with no paid tier, seat limits, or message caps. You self-host it at no license cost. Cedalo sells a separate commercial “Pro” edition adding clustering, high availability, and support, but the core broker used by most deployments is free.

What does Eclipse Mosquitto replace?

Mosquitto is a self-hosted alternative to managed IoT messaging clouds — chiefly AWS IoT Core and Azure IoT Hub. Those services meter connections and messages and tie devices to one cloud; Mosquitto gives you the same MQTT pub/sub on hardware you own, with no per-message billing. You trade the managed provisioning, device shadows, and auto-scaling of the cloud services for full control and near-zero cost.

FAQ

Is Eclipse Mosquitto open source? Yes. It is an Eclipse Foundation project licensed under EPL-2.0 or the BSD-3-Clause Eclipse Distribution License, with source on GitHub.

Can I self-host Mosquitto for free? Yes — the broker is free to run with no license fee or message limits. Only Cedalo’s optional Pro edition (clustering, HA, support) is paid.

Is Mosquitto a good AWS IoT Core or Azure IoT Hub alternative? For device connectivity and MQTT pub/sub, yes — it removes per-message billing and cloud lock-in. You give up managed extras like device shadows, rules engines, and automatic scaling, which you’d rebuild or do without.

What do I need to run Mosquitto? Very little — a single binary on Linux, Windows, macOS, or a small ARM device like a Raspberry Pi. It uses about 3 MB of RAM; TLS needs OpenSSL and disk persistence uses an optional SQLite/file store.