A fully compliant, embeddable high-performance MQTT v5 and v3.1.1 broker/server written in Go for IoT and pub/sub applications.
Mochi-MQTT is a fully compliant MQTT v5 (and v3.1.1) broker/server written in Go, designed for telemetry and internet-of-things projects. It can be used as a standalone binary or embedded as a library, offering a lightweight and fast solution with a focus on quality and maintainability.
Go developers building IoT or telemetry systems who need a high-performance, embeddable MQTT broker with full protocol compliance and extensive customization options.
Developers choose Mochi-MQTT for its full MQTT v5 compliance, embeddable library design, and extensive developer control through exported core code, hook-based plugin system, and packet injection capabilities.
The fully compliant, embeddable high-performance Go MQTT v5 server for IoT, smarthome, and pubsub
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements the complete MQTT v5.0.0 specification including user properties, topic aliases, and shared subscriptions, with hybrid support for v3.1.1 and v3.0.0, as confirmed by passing Paho interoperability tests.
Exports core broker code and provides a flexible hook-based system for plugins, allowing total customization of authentication, persistence, and packet handling through events like OnPacketRead and OnACLCheck.
Uses a trie-based topic model and client-specific write buffers to handle irregular client behavior, with over a thousand unit tests and benchmarks showing competitive performance against brokers like Mosquitto.
Can be run as a standalone binary or embedded as a library in Go projects, offering a lightweight solution with an inline client for direct publishing and subscribing from embedding code.
Clustering is listed on the roadmap but not yet implemented, limiting scalability for distributed deployments without custom development or external solutions.
File-based configuration only supports built-in hooks and listeners, and custom setups require programming with the hook system, increasing initial development time compared to more pre-configured brokers.
Defaults like maximum message expiry intervals are set to 24 hours to prevent DOS attacks, which may need adjustment for trusted environments, adding setup complexity and potential confusion.
mochi mqtt is an open-source alternative to the following products:
EMQX is an open-source, scalable MQTT broker for IoT and real-time messaging applications, supporting millions of concurrent connections.
Mosquitto is an open-source message broker that implements the MQTT protocol, commonly used for IoT applications and lightweight machine-to-machine communication.