All Projects → nanomq → Nanomq

nanomq / Nanomq

Licence: mit
Nano MQTT Broker - An Ultra-light and Blazing-fast MQTT Broker for IoT Edge

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Nanomq

emqx-retainer
EMQ X Retainer
Stars: ✭ 19 (-81.73%)
Mutual labels:  mqtt, mqtt-broker
Mqtt Panel
A web interface for MQTT
Stars: ✭ 315 (+202.88%)
Mutual labels:  mqtt, mqtt-broker
Emitter
High performance, distributed and low latency publish-subscribe platform.
Stars: ✭ 3,130 (+2909.62%)
Mutual labels:  mqtt, mqtt-broker
sol
Lightweight MQTT broker, written from scratch. IO is handled by a super simple event loop based upon the most common IO multiplexing implementations.
Stars: ✭ 72 (-30.77%)
Mutual labels:  mqtt, mqtt-broker
Thingsboard Gateway
Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
Stars: ✭ 796 (+665.38%)
Mutual labels:  mqtt, mqtt-broker
kafka-connect-iot-mqtt-connector-example
Internet of Things Integration Example => Apache Kafka + Kafka Connect + MQTT Connector + Sensor Data
Stars: ✭ 170 (+63.46%)
Mutual labels:  mqtt, mqtt-broker
Gmqtt
Gmqtt is a flexible, high-performance MQTT broker library that fully implements the MQTT protocol V3.1.1 and V5 in golang
Stars: ✭ 290 (+178.85%)
Mutual labels:  mqtt, mqtt-broker
mqttools
MQTT version 5.0 client and broker using asyncio
Stars: ✭ 44 (-57.69%)
Mutual labels:  mqtt, mqtt-broker
Mqtt.js
The MQTT client for Node.js and the browser
Stars: ✭ 6,723 (+6364.42%)
Mutual labels:  mqtt, mqtt-broker
Hbmqtt
MQTT client/broker using Python asynchronous I/O
Stars: ✭ 667 (+541.35%)
Mutual labels:  mqtt, mqtt-broker
zmosq
MQTT/Mosquitto / ZeroMQ proxy
Stars: ✭ 22 (-78.85%)
Mutual labels:  mqtt, mqtt-broker
Aedes
Barebone MQTT broker that can run on any stream server, the node way
Stars: ✭ 1,007 (+868.27%)
Mutual labels:  mqtt, mqtt-broker
channels-asgi-mqtt
Interface between MQTT and ASGI and Channels 2.0 compatible
Stars: ✭ 36 (-65.38%)
Mutual labels:  mqtt, mqtt-broker
lannister
A lightweight MQTT broker w/ full spec,Clustering,WebSocket,SSL written in Java
Stars: ✭ 20 (-80.77%)
Mutual labels:  mqtt, mqtt-broker
tutorials.IoT-over-MQTT
📙 FIWARE 203: Provisioning Ultralight with an alternative transport: IoT over MQTT
Stars: ✭ 49 (-52.88%)
Mutual labels:  mqtt, mqtt-broker
Openremote
100% open-source IoT Platform - Integrate your assets, create rules, and visualize your data
Stars: ✭ 254 (+144.23%)
Mutual labels:  mqtt, mqtt-broker
Iot Harbor
reactor3实现的mqtt库
Stars: ✭ 234 (+125%)
Mutual labels:  mqtt, mqtt-broker
Mosquitto Cluster
a built-in, autonomous Mosquitto Cluster implementation. MQTT集群.
Stars: ✭ 238 (+128.85%)
Mutual labels:  mqtt, mqtt-broker
Hivemq Community Edition
HiveMQ CE is a Java-based open source MQTT broker that fully supports MQTT 3.x and MQTT 5. It is the foundation of the HiveMQ Enterprise Connectivity and Messaging Platform
Stars: ✭ 562 (+440.38%)
Mutual labels:  mqtt, mqtt-broker
Emqx
An Open-Source, Cloud-Native, Distributed MQTT Message Broker for IoT.
Stars: ✭ 8,951 (+8506.73%)
Mutual labels:  mqtt, mqtt-broker

NanoMQ

Nano MQTT Broker A light-weight and Blazing-fast MQTT Broker for IoT Edge platform. NanoMQ is base on NNG's asynchronous I/O threading model. With an extension of MQTT support in the protocol layer and reworked transport layer. Plus an enhanced asynchronous IO mechanism to maximize the throughout capacity.

Features

  1. Cost-effective on embedded platform.
  2. Fully base on native POSIX. High Compatibility.
  3. Pure C/C++ implementation. High portability.
  4. Fully asynchronous I/O and multi-threading.
  5. Good support for SMP.
  6. Low latency & High handling capacity.

QuickStart

  1. Compile & Install

To build NanoMQ, you will need a C99 & C++11 compatible compiler and CMake version 3.13 or newer.

Basically, you need to compile and install NanoMQ by following steps :

$PROJECT_PATH/nanomq$ mkdir build & cd build

$PROJECT_PATH/nanomq/build$ cmake -G Ninja ..

$PROJECT_PATH/nanomq/build$ sudo ninja install

Or you can compile it without ninja:

$PROJECT_PATH/nanomq$ mkdir build ; cd build; cmake .. ; make

  1. Compile dependency

Please be aware that NanoMQ depends on nanolib & nng(nanonng for MQTT)

both dependencies can be compiled independently

$PROJECT_PATH/nanomq/nng/build$ cmake -G Ninja .. $PROJECT_PATH/nanomq/nng/build$ ninja install

compile nanolib independently:

$PROJECT_PATH/nanolib/build$ cmake -G Ninja .. $PROJECT_PATH/nanolib/build$ ninja install

Configuration

NanoMQ provides several options for optimizing performance according to your system.

Configure method

NanoMQ can start with contents of configure file named config.cmake.in.

$PROJECT_PATH/nanomq/build$ cmake -DCFG_METHOD=FILE_CONFIG ..

Of course, NanoMQ can start with cmake-gui or cmake with arguments.

$PROJECT_PATH/nanomq/build$ cmake -DCFG_METHOD=CMAKE_CONFIG ..

Arguments

limiting the number of threads:

$PROJECT_PATH/nanomq/build$ cmake -G Ninja -DCFG_METHOD=CMAKE_CONFIG -DNNG_RESOLV_CONCURRENCY=1 -DNNG_NUM_TASKQ_THREADS=5 -DNNG_MAX_TASKQ_THREADS=5 ..

For debugging, NanoMQ has a debugging system that logs all information from all threads. Which is aligned with Syslog standard. And you can disable/enable it by:

$PROJECT_PATH/nanomq/build$ cmake -G Ninja -DCFG_METHOD=CMAKE_CONFIG -DNOLOG=1  ..
$PROJECT_PATH/nanomq/build$ cmake -G Ninja -DCFG_METHOD=CMAKE_CONFIG -DNOLOG=0  ..

Message queue support:

For macos, mqueue is not support, you can set -DMQ=0 to disable it. It is enabled by default.

$PROJECT_PATH/nanomq/build$ cmake -G Ninja -DCFG_METHOD=CMAKE_CONFIG -DMQ=1  ..
$PROJECT_PATH/nanomq/build$ cmake -G Ninja -DCFG_METHOD=CMAKE_CONFIG -DMQ=0  ..

System tunning parameters:

set max size of fixed header + variable header for MQTT packet , default is 64 bytes

$PROJECT_PATH/nanomq/build$ cmake -G Ninja -DCFG_METHOD=CMAKE_CONFIG -DNANO_PACKET_SIZE=set ..

set max fixed header size for MQTT packet, default is 5.

$PROJECT_PATH/nanomq/build$ cmake -G Ninja -DCFG_METHOD=CMAKE_CONFIG -DNANO_HEADER_SIZE=set ..

set max property size for MQTT packet, default is 32

$PROJECT_PATH/nanomq/build$ cmake -G Ninja -DCFG_METHOD=CMAKE_CONFIG -DNANO_PROPERTY_SIZE=set ..

set queue length for QoS message, default is 64

$PROJECT_PATH/nanomq/build$ cmake -G Ninja -DCFG_METHOD=CMAKE_CONFIG -DNANO_QOS_LEN=set ..

set queue length for resending message, default is 64

$PROJECT_PATH/nanomq/build$ cmake -G Ninja -DCFG_METHOD=CMAKE_CONFIG -DNANO_MSQ_LEN=set ..

set nano qos timer, default is 30 seconds

$PROJECT_PATH/nanomq/build$ cmake -G Ninja -DCFG_METHOD=CMAKE_CONFIG -DNANO_QOS_TIMER=set ..

set logical concurrency limitation by -DPARALLEL, default is 32

$PROJECT_PATH/nanomq/build$ cmake -G Ninja -DCFG_METHOD=CMAKE_CONFIG -DPARALLEL=32 ..

For more information about these parameters, please refer to the project's Wiki

Usage

#Start MQTT Broker

nanomq broker start 'tcp://localhost:1883' &

Currently, NanoMQ only supports MQTT 3.1.1, partially supports MQTT 5.0

#test POSIX message Queue

nanomq broker mq start/stop

Communities

You can join us on the Slack channel:

#nanomq: general usage

#nanomq-dev : for MQTT lover & developer

#nanomq-nng : for users & nng project.

More communities on GitHub, Slack, Reddit, Twitter, Gitter, Discord are coming soon.

Authors

The EMQ X team.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].