项目 / nanomq/nanomq
nanomq/nanomq
行业推荐
语言 C标签 mqttmqtt-brokeriot-edgenngaioactor-modelasynchronoussmpparrallel-computingiotmessagingmqtt-servermanufacturingmqtt-protocolmqtt5pubsubiiotmosquittoconnected-vehiclessoftware-defined-vehicle数据更新 2026-11-24 06:50:13 · 仓库 2026-11-23
一段话介绍
面向边缘和智能汽车(SDV)场景的消息平台,包含用于物联网的 MQTT 代理,以及较轻量的消息总线。源文写明完整支持 MQTT V3.1.1/3.1 和 MQTT V5.0,实现为纯 C,基于原生 POSIX,并采用异步 I/O 与多线程。可用 `docker run -d --name nanomq -p 1883:1883 -p 8083:8083 -p 8883:8883 emqx/nanomq:latest` 启动,也可从 [nanomq.io/downloads](https://nanomq.io/downloads) 下载后执行 `nanomq start`,或加 `--conf` 指定配置文件。介绍见 [nanomq.io](https://nanomq.io/),说明见[仓库 README](https://github.com/nanomq/nanomq)。本页只写用途与入口。
本站整理,非 GitHub 官方 description。
官方 description(GitHub API 原样)An ultra-lightweight and blazing-fast Messaging Bus/MQTT Broker for Edge & SDV
2,667累计星
324Fork
—峰值日增
0上榜次数
官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。
设备物联接入与边缘采集
适配系统:物联网平台、边缘计算网关 · 得分 1.4
实现工业协议解析与设备接入管理,可作为物联网平台的设备接入层与数据采集前置。
更多信息
以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。
我的用法
NanoMQ 可用 Docker 一条命令启动并映射 1883、8083、8883 端口,也可从官网下载后用 nanomq start 启动,并可加 --conf 指定配置文件。
特点或设计要点
NanoMQ 面向嵌入式平台,纯 C 实现、完全基于原生 POSIX,具备全异步 I/O 与多线程、良好的 SMP 支持,主打低成本、低延迟和高处理能力。
星标走势还差一天的数据,明天就能看到曲线
每天 10:30 记一次星标,连续两天后自动生成曲线
GitHub 项目主页介绍
来自 GitHub 仓库 README / 主页介绍正文,原样摘录,共 8,141 字节。
# LF Edge NanoMQ
[](https://github.com/emqx/nanomq/releases)
[](https://github.com/emqx/nanomq/actions)
[](https://hub.docker.com/r/emqx/nanomq)
[](https://discord.gg/xYGf3fQnES)
[](https://twitter.com/EMQTech)
[](https://www.youtube.com/channel/UC5FjR77ErAxvZENEWzQaO5Q)
[](https://github.com/emqx/nanomq/discussions)
[](https://codecov.io/gh/emqx/nanomq)
[](https://github.com/emqx/nanomq/blob/master/LICENSE.txt)
NanoMQ MQTT Broker (NanoMQ) is an all-around Edge Messaging Platform that includes a blazing-fast MQTT Broker for the IoT/IIoT and a lightweight Messaging Bus for SDV.
NanoMQ's embedded Actor architecture extends NNG's internal asynchronous I/O, plus an enhanced message passing and scheduling system to maximize the overall capacity. Fine-tuned towards the embedded environment and mission-critical scenarios.
NanoMQ fully supports MQTT V3.1.1/3.1 and MQTT V5.0.
For more information, please visit [NanoMQ homepage](https://nanomq.io/).
## Features
- Cost-effective on an embedded platform;
- Fully based on native POSIX. High Compatibility;
- Pure C implementation. High portability;
- Fully asynchronous I/O and multi-threading;
- Good support for SMP;
- Low latency & High handling capacity;

## Get Started
### Run NanoMQ using Docker
```bash
docker run -d --name nanomq -p 1883:1883 -p 8083:8083 -p 8883:8883 emqx/nanomq:latest
```
### More installation options
If you prefer to install and manage NanoMQ yourself, you can download the latest version from [nanomq.io/downloads](https://nanomq.io/downloads).
#### Run NanoMQ:
```bash
nanomq start
## or run nanomq with a specified configuration file
nanomq start --conf <config_file>
```
## Build From Source
NanoMQ is dedicated to delivering a simple but powerful Messaging Hub on various edge platforms.
With this being said, NanoMQ can run on different architectures such like x86_64 and ARM with minor migration efforts.
Building NanoMQ requires a C99-compatible compiler and [CMake](http://www.cmake.org/) (version 3.13 or newer).
- It is recommended to compile with `Ninja`:
```bash
git clone https://github.com/emqx/nanomq.git
cd nanomq
git submodule update --init --recursive
mkdir build && cd build
cmake -G Ninja ..
ninja
```
- Or compile with `make`:
``` bash
git clone https://github.com/emqx/nanomq.git
cd nanomq
git submodule update --init --recursive
mkdir build && cd build
cmake ..
make
```
### Build option
There are some configuration options specified using CMake defines in addition to the standard options like `CMAKE_BUILD_TYPE`:
- `-DNNG_ENABLE_QUIC=ON`: to build NanoMQ with QUIC bridging feature
- `-DNNG_ENABLE_TLS=ON`: to build with TLS support. (Need to install [mbedTLS](https://tls.mbed.org) in advance)
- `-DBUILD_CLIENT=OFF`: to disable nanomq tools client suite (including pub / sub / conn )
- `-DBUILD_ZMQ_GATEWAY=ON`: to build `nanomq_cli` with zeromq gateway tool
- `-DBUILD_NFTP=ON`: to build `nanomq_cli` with nftp client
- `-DBUILD_DDS_PROXY=ON`: to build `nanomq_cli` with dds client ( proxy / sub / pub )
- `-DBUILD_BENCH=ON`: to build `nanomq_cli` mqtt bench
- `-DENABLE_JWT=ON`: to build JWT dependency for http server
- `-DNNG_ENABLE_SQLITE=ON`: to build nanomq with sqlite support
- `-DBUILD_STATIC_LIB=ON`: to build nanomq as a static library
- `-DBUILD_SHARED_LIBS=ON`: to build nanomq as a shared library
- `-DDEBUG=ON`: to enable debug flag
- `-DASAN=ON`: to enable sanitizer
- `-DDEBUG_TRACE=ON`: to enable ptrace (ptrace is a mechanism that allows one process to “trace” the execution of another process. The tracer is able to
pause execution, and inspect and modify memory and registers in the tracee process)
## Resources
- NanoMQ
- [Blog](https://www.emqx.com/en/blog/category/nanomq)
- [Official website](https://nanomq.io/)
- Zephyr RTOS
- [Porting NanoMQ to Zephyr RTOS: Running an MQTT Broker Directly on an MCU](./docs/en_US/tutorial/port-to-zephyr.md)
- MQTT Specifications
- [MQTT Version 3.1.1](https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html)
- [MQTT Version 5.0](https://docs.oasis-open.org/mqtt/mqtt/v5.0/cs02/mqtt-v5.0-cs02.html)
- [MQTT SN](http://mqtt.org/new/wp-content/uploads/2009/06/MQTT-SN_spec_v1.2.pdf)
- *Unsupported features of MQTT 5.0*
- Auth https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901217
- Server Redirection https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901255
- MQTT Client Examples
- [MQTT-Client-Examples](https://github.com/emqx/MQTT-Client-Examples)
- MQTT Client SDK
- [NanoSDK](https://github.com/nanomq/NanoSDK)
- Internet of Vehicles
- [Internet of Vehicles](https://www.emqx.com/en/blog/category/internet-of-vehicles). Build a reliable, efficient, and industry-specific IoV platform based on EMQ's practical experience, from theoretical knowledge such as protocol selection to practical operations like platform architecture design.
- DDS
- [CycloneDDS](https://cyclonedds.io/)
- [DDS proxy on NanoMQ_CLI](./nanomq_cli/dds2mqtt/README.md)
## Get Involved
### Our Website
Visit our [official website](https://nanomq.io/) to have a good grasp on NanoMQ MQTT broker and see how it can be applied in current industries.
### Test Report
This [test report](https://nanomq.io/docs/latest/test-report.html#about-nanomq) shows how extraordinary and competitive the NanoMQ is in Edge Computing.
*Currently the benchmark is for 0.2.5, the updated one with ver 0.3.5 is coming soon*
### Questions
The [Github Discussions](https://github.com/emqx/nanomq/discussions) provides a place for you to ask questions and share your ideas with users around the world.
### Slack
You could join us on [Slack](https://slack-invite.emqx.io/). We now share a workspace with the entire EMQ X team. After joining, find your channel!
- `#nanomq`: is a channel for general usage, where for asking questions or sharing using experience;
- `#nanomq-dev`: is a channel for MQTT lovers and developers, your great thoughts are what we love to hear;
- `#nanomq-nng`: is a channel for guys who are interested in NNG, one of our fabulous dependencies.
## Community
Some quotes from NNG's maintainer --- Garrett:
I’m very excited about the synergy between the NanoMQ and NNG projects, and grateful for sponsorship that NNG has received from the NanoMQ team. The NanoMQ team has been able to push NNG's envelope, and the collaboration has already yielded substantial improvements for both projects. Further, the cooperation between these two project will make MQTT and SP (nanomsg) protocols easy to use within a single project as well as other capabilities (such as websockets, HTTPS clients and servers), greatly expanding the toolset within easy reach of the IoT developer. Further this comes without the usual licensing or portability/embeddability challenges that face other projects. Additional planned collaborative work will further expand on these capabilities to the benefit of our shared communities.
### Open Source
NanoMQ is fully open-sourced!
## License
[MIT License](./LICENSE.txt)
## Authors
The EMQ Edge Computing team.