Repolode
eclipse-mosquitto

eclipse-mosquitto/mosquitto

An open source MQTT broker (server) supporting MQTT 5.0, 3.1.1 and 3.1, plus C/C++ client libraries and command-line tools.

Stars
11,291
Forks
2,652
Open issues
905
Last commit
10 days ago

What is it?

Eclipse Mosquitto is a lightweight message broker that implements the MQTT publish/subscribe protocol, commonly used to connect IoT devices, sensors and other clients that exchange small messages over a network. It supports MQTT versions 5.0, 3.1.1 and 3.1.

Besides the broker, the project ships a C and C++ client library and command-line tools: mosquitto_pub and mosquitto_sub for publishing and subscribing, mosquitto_rr for request/response, and mosquitto_ctrl, mosquitto_signal and mosquitto_passwd for administering the broker. Authentication methods and a dynamic security plugin are available for controlling access, and a configuration file defines listeners.

The build supports Windows, macOS and other Unix-like systems via make or CMake, with optional features such as TLS through OpenSSL, SQLite-based persistence, SRV lookup and an HTTP API.

Key features

  • 01Implements MQTT 5.0, 3.1.1 and 3.1 broker functionality.
  • 02Includes C and C++ client libraries.
  • 03Provides mosquitto_pub and mosquitto_sub command-line clients.
  • 04Offers admin tools such as mosquitto_passwd and mosquitto_ctrl.
  • 05Supports TLS via OpenSSL and authentication plugins, including a dynamic security plugin.

Use cases

  • Connecting IoT devices and sensors through a central MQTT broker.
  • Running a self-hosted message broker for home automation or industrial telemetry.
  • Testing MQTT clients locally using the bundled publish and subscribe tools.

Quick start

  1. 1

    Install a binary package from the Mosquitto download page

  2. 2

    Start the broker with the basic configuration

    mosquitto
  3. 3

    Subscribe to a test topic

    mosquitto_sub -t 'test/topic' -v
  4. 4

    Publish a test message

    mosquitto_pub -t 'test/topic' -m 'hello world'

Things to know

  • Running the broker with no configuration allows anonymous access, but only from the local computer.
  • Remote clients need a configuration file with a listener and authentication set up.

Topics

FAQ

What is mosquitto?
An open source MQTT broker (server) supporting MQTT 5.0, 3.1.1 and 3.1, plus C/C++ client libraries and command-line tools. Eclipse Mosquitto is a lightweight message broker that implements the MQTT publish/subscribe protocol, commonly used to connect IoT devices, sensors and other clients that exchange small messages over a network. It supports MQTT versions 5.0, 3.1.1 and 3.1.
Is mosquitto free to use? What license does it have?
mosquitto is open source under the Other license. Check the license terms before using it in commercial products.
Is mosquitto still maintained?
Actively maintained. The last commit to mosquitto was on Oct 15, 2026.
What can I use mosquitto for?
Connecting IoT devices and sensors through a central MQTT broker. Running a self-hosted message broker for home automation or industrial telemetry. Testing MQTT clients locally using the bundled publish and subscribe tools.
How do I install mosquitto?
Install a binary package from the Mosquitto download page Start the broker with the basic configuration: mosquitto Subscribe to a test topic: mosquitto_sub -t 'test/topic' -v Publish a test message: mosquitto_pub -t 'test/topic' -m 'hello world'
Where can I get mosquitto?
The source code and installation instructions are on GitHub: https://github.com/eclipse-mosquitto/mosquitto

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects