1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/nanomq
2024-05-20 18:07:51 +08:00
..
data/etc add nanomq 2024-05-20 17:43:35 +08:00
docker-compose.yml update nanomq 2024-05-20 18:07:51 +08:00
README.md add nanomq 2024-05-20 17:43:35 +08:00

nanomq

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.

up and running

$ mkdir -p data/{etc,log,var}
$ wget -P data/etc https://github.com/nanomq/nanomq/raw/master/etc/nanomq.conf
$ vi data/etc/nanomq.conf
$ docker compose up -d
$ curl -u admin:public http://192.168.42.156:8081/api/v4/brokers

quick start

$ mosquitto_sub -h 127.0.0.1 -p 1883 -t test -v
$ mosquitto_pub -h 127.0.0.1 -p 1883 -t test -m hello

rule engine

By default, the rule engine function is disabled. To enable it, please compile with the -DENABLE_RULE_ENGINE=ON option.

$ echo 'create table test(topic text, payload text)' | sqlite3 -cmd '.mode csv' data/var/test.db
$ echo 'select * from test' | sqlite3 -cmd '.mode csv' data/var/test.db