Git Product home page Git Product logo

nanomq's Introduction

LF Edge NanoMQ

GitHub Release Build Status Docker Pulls Discord Twitter YouTube Community codecov License

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.

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;

image

Get Started

Run NanoMQ using Docker

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.

Run NanoMQ:

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 (version 3.13 or newer).

  • It is recommended to compile with Ninja:

    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:

    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 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

Get Involved

Our Website

Visit our official website to have a good grasp on NanoMQ MQTT broker and see how it can be applied in current industries.

Test Report

This test report 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 provides a place for you to ask questions and share your ideas with users around the world.

Slack

You could join us on Slack. 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

Authors

The EMQ Edge Computing team.

nanomq's People

Contributors

alvin1221 avatar alvinwong2018 avatar arpitpandey0209 avatar brahste avatar dferrarigrowtech avatar eltociear avatar emqplus avatar gala-r avatar guanchushen avatar hongwei-w avatar hujung-de avatar jaylinyu avatar kisspeter avatar lenalenapan avatar longlene avatar meggielqk avatar odywayne avatar ranmaoyi avatar red-asuka avatar risicle avatar rory-z avatar smartmind12 avatar swilder-m avatar taotieren avatar wanghaemq avatar xinyi-xs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nanomq's Issues

Msg lost of session keeping

With clean session set to 0, QoS 1/2 msgs ought to be kept in session and retransmit after reconnection. however msgs got lost in such case.

Error: The connection was lost.

cd nanomq
mkdir build
cmake -DMQ=0 .. 
make -j8
./build/nanomq/nanomq broker start
.
.
.
ERROR: pipe is gone, pub failed
(base) lvmc@Luizs-MacBook-Pro ~ % mosquitto_sub -h 127.0.0.1 -t 'banana'
(base) lvmc@Luizs-MacBook-Pro ~ % mosquitto_pub -h 127.0.0.1 -t 'banana' -m 'x'
Error: The connection was lost.

MacOS Big Sur 11.4

A segmentation fault occurs when a mosquitto client pubs a message

A segmentation fault occurs when a mosquitto client tries to pub a message.

To reproduce this problem, first, launch nanomq broker, the localhost:1883 was used. Then subscribe to a message using mosquitto_sub before publishing a message with mosquitto_pub. The particular command used is mosquitto_sub -h "127.0.0.1" -t "abc/123" -d and mosquitto_pub -h "127.0.0.1" -d -t "abc/123" -p 1883 -m "hello". The topic of the message could be any type, that is with and without a wildcard character.

This issue won't be regenerated if a specific client_id is designated for the publisher, for example, no issue will occur when the command mosquitto_pub -t "abc/123" -m "hello" -h "127.0.0.1" -d -i "abcdefglkfjewjvweionfioewnriejfiewjfwe". As for the subscriber, no issue will occur even if no specific client_id is designated.

By using a debugging function given by VSCode, the exception can be located at the place where the attached screenshot shows.
Screen Shot 2021-02-26 at 1 42 44 PM

The following is some spec of the running environment:
System: Linux Ubuntu 20x
mosquitto: version 2.0.5
nanomq: commit 2623df6, Feb 26 2020 @ 11:42

DB_TREE nanolib crashed

crashed with segment fault when adding a huge amount of topics horizontally with a low interval(lower than 30ms).

Sat Nov 21 10:39:55 2020 server_cb: WAIT ^^^^^^^^^^^^^^^^^^^^^ 1 ^^^^
Sat Nov 21 10:39:55 2020 server_cb: WAIT ^^^^^^^^^^^^^^^^^^^^^ 2 ^^^^
Sat Nov 21 10:39:55 2020 decode_sub_message: remainLen: [15] packetid : [2]
Sat Nov 21 10:39:55 2020 decode_sub_message: remainLen: [16] packetid : [2]
Sat Nov 21 10:39:55 2020 decode_sub_message: V:[0 2 0 a] P:[0 a 62 65].
Sat Nov 21 10:39:55 2020 decode_sub_message: V:[0 2 0 b] P:[0 b 62 65].
Sat Nov 21 10:39:55 2020 decode_sub_message: bpos+vpos: [14] remainLen: [15].
Sat Nov 21 10:39:55 2020 decode_sub_message: bpos+vpos: [15] remainLen: [16].
Sat Nov 21 10:39:55 2020 sub_ctx_handle: topicLen: [10] body: [bench/9999]
Sat Nov 21 10:39:55 2020 sub_ctx_handle: topicLen: [11] body: [bench/10000]
[INFO] (../nanolib/mqtt_db.c:592) =========>> SEARCH_NODE_START
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_node:597) topic is: , node->topic is:
[INFO] (../nanolib/mqtt_db.c:592) =========>> SEARCH_NODE_START
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_node:621) searching no hashtag
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_node:597) topic is: , node->topic is:
[INFO] (../nanolib/mqtt_db.c:279) =========>> ADD_NODE_START
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_node:621) searching no hashtag
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:new_db_node:218) new_db_node bench
[INFO] (../nanolib/mqtt_db.c:279) =========>> ADD_NODE_START
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:new_db_node:218) new_db_node 9999
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:new_db_node:218) new_db_node bench
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:add_topic:164) add_topic:bench/9999
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:new_db_node:218) new_db_node 10000
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:add_pipe_id:269) add_pipe_id 1753209733, client_id emqtt-jaylin-XPS-playgorund-fed3af126d3f08b3297a
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:add_topic:164) add_topic:bench/10000
Sat Nov 21 10:39:55 2020 sub_ctx_handle: -----CHECKHASHTABLE----clientid: [emqtt-jaylin-XPS-playgorund-fed3af126d3f08b3297a]---topic: [bench/9999]---pipeid: [1753209733]
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:add_pipe_id:269) add_pipe_id 1753209734, client_id emqtt-jaylin-XPS-playgorund-fee450f38edf305da8ce
Sat Nov 21 10:39:55 2020 sub_ctx_handle: -----CHECKHASHTABLE----clientid: [emqtt-jaylin-XPS-playgorund-fee450f38edf305da8ce]---topic: [bench/10000]---pipeid: [1753209734]
[INFO] (../nanolib/mqtt_db.c:592) =========>> SEARCH_NODE_START
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_node:597) topic is: , node->topic is:
[INFO] (../nanolib/mqtt_db.c:592) =========>> SEARCH_NODE_START
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_node:621) searching no hashtag
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_node:597) topic is: , node->topic is:
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_node:597) topic is: bench, node->topic is: bench
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_node:621) searching no hashtag
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_node:621) searching no hashtag
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_node:597) topic is: bench, node->topic is: bench
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_node:597) topic is: 9999, node->topic is: 10000
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_node:621) searching no hashtag
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_node:602) searching unqual
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_node:597) topic is: 10000, node->topic is: 10000
Sat Nov 21 10:39:55 2020 sub_ctx_handle: client count [0]
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_node:621) searching no hashtag
Sat Nov 21 10:39:55 2020 sub_ctx_handle: client count [1]
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_retain_msg:810) search entry
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_retain_msg:812)
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_retain_msg:865) check normal
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_retain_msg:810) search entry
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_retain_msg:896) go deep
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_retain_msg:812)
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_retain_msg:812) bench
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_retain_msg:865) check normal
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_retain_msg:865) check normal
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_retain_msg:896) go deep
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_retain_msg:896) go deep
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_retain_msg:812) bench
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_retain_msg:812) 9999
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_retain_msg:865) check normal
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_retain_msg:865) check normal
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_retain_msg:896) go deep
[INFO] Sat Nov 21 10:39:55 2020 (140689628710656:search_retain_msg:870) not find retain msg
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_retain_msg:812) 10000
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_retain_msg:865) check normal
[INFO] Sat Nov 21 10:39:55 2020 (140689603532544:search_retain_msg:883) not find retain msg
-------------------DB_TREE---------------------
TOPIC | HASHTAG&PLUS | CLIENTID | FATHER_NODE

"" 00 -- --

Segmentation fault (core dumped)

Qos Msg overflow

Bug Publish QoS 1/2 msg to QoS 0 client cause msg overflow and client disconnect/crash.
Reason tcp_send_start is not reentranable.

NanoMQ drops msg from wildcard topic.

potential fix:

  1. mqtt_db responsible for passing the value of qos level of each msg to the protocol layer.
  2. duplicate wildcard topic of each level in nano_db (better not)

sanity check for --id length

From MQTT specification we have: The Client Identifier (Client ID) is between 1 and 23 characters long

Works:

mosquitto_pub --id "$(openssl rand -hex 1)" -h 127.0.0.1 -t "test" -m "$(openssl rand -hex 21)"
mosquitto_pub --id "$(openssl rand -hex 10)" -h 127.0.0.1 -t "test" -m "$(openssl rand -hex 21)"
mosquitto_pub --id "$(openssl rand -hex 100)" -h 127.0.0.1 -t "test" -m "$(openssl rand -hex 21)"
mosquitto_pub --id "$(openssl rand -hex 1000)" -h 127.0.0.1 -t "test" -m "$(openssl rand -hex 21)"
mosquitto_pub --id "$(openssl rand -hex 10000)" -h 127.0.0.1 -t "test" -m "$(openssl rand -hex 21)"

Fails (message is not sent to sub), no error (maybe there is an overflow underhood?):

mosquitto_pub --id "$(openssl rand -hex 100000)" -h 127.0.0.1 -t "test" -m "$(openssl rand -hex 21)"

咨询下与EMQX的区别

主要目前是EMQX,无意在逛官方发现NanoMQ,感觉是边缘计算,搭建在终端的MQTT5.0 Broker吗?

建议增加配置文件

与其编译的时候设置参数,不如使用配置文件来实现。
比如说,ini文件,或者普通的linux配置文件格式都行。

另外,
建议增加用户,密码访问方式;
增加topic过滤功能。

目前来看,似乎只是一个简单的消息中转站。

QoS 2 msg duplicates

QoS retry mechanism needs a deep review.
considering following 2 stages in the next coming version:

  1. Move QoS AIO from the transport layer to protocol layer, and only send PUBACK/PUBREC after PUBLISH has been sent.
  2. Refactoring QoS retry mechanism by constraining PUBLISH sequence.

Broker crashed when massive payload got aborted, but broker still trying to pub msgs.

*** Error in `nanomq/nanomq': malloc(): memory corruption (fast): 0x00007f73ac200710 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777f5)[0x7f73b8b4a7f5]
/lib/x86_64-linux-gnu/libc.so.6(+0x82679)[0x7f73b8b55679]
/lib/x86_64-linux-gnu/libc.so.6(__libc_calloc+0xba)[0x7f73b8b57e3a]
nanomq/nanomq(nni_msg_append+0xcf)[0x428d2f]
nanomq/nanomq(encode_pub_message+0x1b1)[0x417671]
nanomq/nanomq(server_cb+0x101)[0x419171]
nanomq/nanomq[0x42f911]
nanomq/nanomq[0x43011a]
nanomq/nanomq[0x432722]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f73b949f6ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f73b8bda4dd]
======= Memory map: ========
00400000-0046a000 r-xp 00000000 103:09 2384663 /projects/nanomq-nng/build/nanomq/nanomq
00669000-0066a000 r--p 00069000 103:09 2384663 /projects/nanomq-nng/build/nanomq/nanomq
0066a000-0066b000 rw-p 0006a000 103:09 2384663 /projects/nanomq-nng/build/nanomq/nanomq
0066b000-0066c000 rw-p 00000000 00:00 0
01f66000-01fb9000 rw-p 00000000 00:00 0 [heap]
7f73a0000000-7f73a1449000 rw-p 00000000 00:00 0
7f73a1449000-7f73a4000000 ---p 00000000 00:00 0
7f73a4000000-7f73a4021000 rw-p 00000000 00:00 0
7f73a4021000-7f73a8000000 ---p 00000000 00:00 0
7f73a8000000-7f73a824a000 rw-p 00000000 00:00 0
7f73a824a000-7f73ac000000 ---p 00000000 00:00 0
7f73ac000000-7f73ad4d5000 rw-p 00000000 00:00 0
7f73ad4d5000-7f73b0000000 ---p 00000000 00:00 0
7f73b0000000-7f73b0021000 rw-p 00000000 00:00 0
7f73b0021000-7f73b4000000 ---p 00000000 00:00 0
7f73b4db1000-7f73b4dbc000 r-xp 00000000 103:09 1989707 /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f73b4dbc000-7f73b4fbb000 ---p 0000b000 103:09 1989707 /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f73b4fbb000-7f73b4fbc000 r--p 0000a000 103:09 1989707 /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f73b4fbc000-7f73b4fbd000 rw-p 0000b000 103:09 1989707 /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f73b4fbd000-7f73b4fc3000 rw-p 00000000 00:00 0
7f73b4fc3000-7f73b4fc4000 ---p 00000000 00:00 0
7f73b4fc4000-7f73b57c4000 rw-p 00000000 00:00 0
7f73b57c4000-7f73b57c5000 ---p 00000000 00:00 0
7f73b57c5000-7f73b5fc5000 rw-p 00000000 00:00 0
7f73b5fc5000-7f73b5fc6000 ---p 00000000 00:00 0
7f73b5fc6000-7f73b67c6000 rw-p 00000000 00:00 0
7f73b67c6000-7f73b67c7000 ---p 00000000 00:00 0
7f73b67c7000-7f73b6fc7000 rw-p 00000000 00:00 0
7f73b6fc7000-7f73b6fc8000 ---p 00000000 00:00 0
7f73b6fc8000-7f73b77c8000 rw-p 00000000 00:00 0
7f73b77c8000-7f73b77c9000 ---p 00000000 00:00 0
7f73b77c9000-7f73b7fc9000 rw-p 00000000 00:00 0
7f73b7fc9000-7f73b7fca000 ---p 00000000 00:00 0
7f73b7fca000-7f73b87ca000 rw-p 00000000 00:00 0
7f73b87ca000-7f73b88d2000 r-xp 00000000 103:09 1989698 /lib/x86_64-linux-gnu/libm-2.23.so
7f73b88d2000-7f73b8ad1000 ---p 00108000 103:09 1989698 /lib/x86_64-linux-gnu/libm-2.23.so
7f73b8ad1000-7f73b8ad2000 r--p 00107000 103:09 1989698 /lib/x86_64-linux-gnu/libm-2.23.so
7f73b8ad2000-7f73b8ad3000 rw-p 00108000 103:09 1989698 /lib/x86_64-linux-gnu/libm-2.23.so
7f73b8ad3000-7f73b8c93000 r-xp 00000000 103:09 1989694 /lib/x86_64-linux-gnu/libc-2.23.so
7f73b8c93000-7f73b8e93000 ---p 001c0000 103:09 1989694 /lib/x86_64-linux-gnu/libc-2.23.so
7f73b8e93000-7f73b8e97000 r--p 001c0000 103:09 1989694 /lib/x86_64-linux-gnu/libc-2.23.so
7f73b8e97000-7f73b8e99000 rw-p 001c4000 103:09 1989694 /lib/x86_64-linux-gnu/libc-2.23.so
7f73b8e99000-7f73b8e9d000 rw-p 00000000 00:00 0
7f73b8e9d000-7f73b8eb4000 r-xp 00000000 103:09 1966282 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f73b8eb4000-7f73b90b3000 ---p 00017000 103:09 1966282 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f73b90b3000-7f73b90b4000 r--p 00016000 103:09 1966282 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f73b90b4000-7f73b90b5000 rw-p 00017000 103:09 1966282 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f73b90b5000-7f73b9288000 r-xp 00000000 103:09 3015054 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28
7f73b9288000-7f73b9487000 ---p 001d3000 103:09 3015054 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28
7f73b9487000-7f73b9492000 r--p 001d2000 103:09 3015054 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28
7f73b9492000-7f73b9495000 rw-p 001dd000 103:09 3015054 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28
7f73b9495000-7f73b9498000 rw-p 00000000 00:00 0
7f73b9498000-7f73b94b0000 r-xp 00000000 103:09 1989695 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f73b94b0000-7f73b96af000 ---p 00018000 103:09 1989695 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f73b96af000-7f73b96b0000 r--p 00017000 103:09 1989695 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f73b96b0000-7f73b96b1000 rw-p 00018000 103:09 1989695 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f73b96b1000-7f73b96b5000 rw-p 00000000 00:00 0
7f73b96b5000-7f73b96bc000 r-xp 00000000 103:09 1989714 /lib/x86_64-linux-gnu/librt-2.23.so
7f73b96bc000-7f73b98bb000 ---p 00007000 103:09 1989714 /lib/x86_64-linux-gnu/librt-2.23.so
7f73b98bb000-7f73b98bc000 r--p 00006000 103:09 1989714 /lib/x86_64-linux-gnu/librt-2.23.so
7f73b98bc000-7f73b98bd000 rw-p 00007000 103:09 1989714 /lib/x86_64-linux-gnu/librt-2.23.so
7f73b98bd000-7f73b98e3000 r-xp 00000000 103:09 1989705 /lib/x86_64-linux-gnu/ld-2.23.so
7f73b9994000-7f73b9a56000 rw-p 00000000 00:00 0
7f73b9ab8000-7f73b9abf000 rw-p 00000000 00:00 0
7f73b9ae1000-7f73b9ae2000 rw-p 00000000 00:00 0
7f73b9ae2000-7f73b9ae3000 r--p 00025000 103:09 1989705 /lib/x86_64-linux-gnu/ld-2.23.so
7f73b9ae3000-7f73b9ae4000 rw-p 00026000 103:09 1989705 /lib/x86_64-linux-gnu/ld-2.23.so
7f73b9ae4000-7f73b9ae5000 rw-p 00000000 00:00 0
7ffff6fad000-7ffff6fce000 rw-p 00000000 00:00 0 [stack]
7ffff6fec000-7ffff6fee000 r--p 00000000 00:00 0 [vvar]
7ffff6fee000-7ffff6ff0000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted

Support Retain msg

Currently, NanoMQ's retain msg semantic is broken, needs a deep rewind.

Unable to Connect When a ClientID Gets Reused in Some Cases (Clean_Session)

Hi there, I found an issue when
(step 1) using the particular ClientID to subscribe a topic with a non-clean_session flag (-c) in mosquitto,
(step 2) then disconnect,
(step 3) and then use that same ClientID to subscribe a topic without a non-clean_session flag,
(step 4) and then disconnect,
(step 5) then use that same ClientID to subscribe a topic with the non-clean_session flag.

The following occurs:
mosquito tells me that it is attempting to connect with the broker and could not succeed.

The following is some specs about my testing environment and my testing tools:
mosquitto_sub
NanoMQ broker, commit 1f897bd

Test cases I used:

mosquitto_sub -h 192.168.1.107 -p 1883 -q 0  -d -i client1 -c  -t test1 -k 400 -t test3
mosquitto_sub -h 192.168.1.107 -p 1883 -q 0  -d -i client1  -t test1 -k 400 -t test3
mosquitto_sub -h 192.168.1.107 -p 1883 -q 0  -d -i client1 -c  -t test1 -k 400 -t test3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.