Why NanoMQ

Ultra-lightweight

Ultra-lightweight

Booting footprint is less than 200Kb in minimum feature set.

Asynchronous I/O

Asynchronous I/O

Parallelize computation for IoT & MQTT with built-in actor-model.

Multi-threading

Multi-threading

Scale-out easily to engage multiple cores with less CPU usage in the modern SMP system.

Blazing Fast

Blazing Fast

Achieve million-level TPS. Up to 10 times faster than Mosquitto on a multi-core CPU.

Cross-platform

Cross-platform

Highly compatible and portable with any POSIX based platform.

Interoperability

Interoperability

Transparent and customizable data flow. EdgeOps friendly.

Quick Start

Run with docker

docker run -d --name nanomq emqx/nanomq:latest

Or build from source

git clone https://github.com/nanomq/nanomq.git
cd nanomq ; git submodule update --init --recursive
mkdir build && cd build ; cmake .. ; make

NanoMQ MQTT client usage

# Publish
nanomq_cli pub --url <url> -t <topic> -m <message> [--help]

# Subscribe
nanomq_cli sub --url <url> -t <topic> [--help]

# Connect
nanomq_cli conn --url <url> [--help]

Key Features

Fully MQTT 5.0 Compliant

Fully MQTT 5.0 Compliant

Fully support MQTT 5.0/3.1.1, Compatible with all standard open-source MQTT SDKs.

MQTT Bridges

MQTT Bridges

Bridging message from edge to multiple clouds. In-line connections to Global cloud services.

Message Persistence

Message Persistence

Preserve your business-critical data with built-in data persistence, and resume uploading automatically when the connection is restored.

Rule Engine

Rule Engine

Unlock the flexibility of data with a SQL-based rule engine. Integrates with eKuiper to bring stream processing to the edge.

Integrability

Integrability

Reduce the cost of integrating edge computing applications with event-driven WebHooks. Easy to maintain with EdgeOps friendly HTTP APIs.

All-round

All-round

Support multiple protocols such as ZeroMQ/nanomsg/NNG/WebSocket. Enabling flexible and diverse routing topology on edge with. Secure your IoT connections with TLS/SSL.

Neuron Architecture

Architecture

NanoMQ is small but mighty. It is fully featured and competes in every perspective despite the tiny size.

  • Platform adaptor Layer: Detects whatever hardware and OS NanoMQ inhabited and provide compatible APIs, to avoid platform-lock-in problem.
  • Task Layer: It is a built-in actor model with thread-level parallelism, which make NanoMQ highly scalable on modern SMP system.
  • Transport Layer: Responsible for managing TCP/UDP stream of each pipe/client, and implement Zero-copy to reduce memory usage.
  • Protocol layer: Parse byte stream to MQTT message, generate MQTT events and manage in-flight window.
  • Application layer: Interact with rule-engine and global topic trie. Expose all MQTT messages and events to users with a lock-free state machine.

Built by developers, for developers

Stay connected with the community and us! Ask questions, find answers, explore ideas, and share expertise.