|
|
@@ -1,74 +1,76 @@
|
|
|
-emqtt
|
|
|
-=====
|
|
|
-
|
|
|
-erlang mqtt broker.
|
|
|
+# eMQTT
|
|
|
|
|
|
-requires
|
|
|
-========
|
|
|
+eMQTT is a scalable, fault-tolerant and extensible mqtt broker written in Erlang/OTP.
|
|
|
|
|
|
-erlang R15B+
|
|
|
+eMQTT requires Erlang R17+.
|
|
|
|
|
|
-git client
|
|
|
+## Startup in Five Minutes
|
|
|
|
|
|
-build
|
|
|
-=======
|
|
|
+```
|
|
|
+ $ git clone git://github.com/slimpp/emqtt.git
|
|
|
|
|
|
-make
|
|
|
+ $ cd emqtt
|
|
|
|
|
|
-release
|
|
|
-=======
|
|
|
+ $ make && make generate
|
|
|
|
|
|
-make generate
|
|
|
+ $ cd rel/emqtt
|
|
|
|
|
|
-deloy
|
|
|
-=====
|
|
|
+ $ ./bin/emqtt console
|
|
|
+```
|
|
|
|
|
|
-cp -R rel/emqtt $INSTALL_DIR
|
|
|
+## Deploy and Start
|
|
|
|
|
|
-start
|
|
|
-======
|
|
|
+### start
|
|
|
|
|
|
-cd $INSTALL_DRI/emqtt
|
|
|
+```
|
|
|
+ cp -R rel/emqtt $INSTALL_DIR
|
|
|
|
|
|
-./bin/emqtt console
|
|
|
+ cd $INSTALL_DIR/emqtt
|
|
|
|
|
|
-or
|
|
|
+ ./bin/emqtt start
|
|
|
|
|
|
-./bin/emqtt start
|
|
|
+```
|
|
|
|
|
|
-status
|
|
|
-======
|
|
|
+### stop
|
|
|
|
|
|
-./bin/emqtt_ctl status
|
|
|
+```
|
|
|
+ ./bin/emqtt stop
|
|
|
|
|
|
-stop
|
|
|
-====
|
|
|
+```
|
|
|
|
|
|
-./bin/emqtt stop
|
|
|
+## HTTP API
|
|
|
|
|
|
-logs
|
|
|
-====
|
|
|
+eMQTT support http to publish message.
|
|
|
|
|
|
-log/*
|
|
|
+Example:
|
|
|
|
|
|
-http api
|
|
|
-========
|
|
|
+```
|
|
|
+ curl -v --basic -u user:passwd -d "topic=/a/b/c&message=hello from http..." -k http://localhost:8883/mqtt/publish
|
|
|
+```
|
|
|
|
|
|
-curl -v --basic -u user:passwd -d "topic=/abc&message=akakakk&qos=0" -k http://localhost:8883/mqtt/publish
|
|
|
+### URL
|
|
|
|
|
|
-design
|
|
|
-=====
|
|
|
+```
|
|
|
+ HTTP POST http://host:8883/mqtt/publish
|
|
|
+```
|
|
|
|
|
|
-https://github.com/slimpp/emqtt/wiki
|
|
|
+### Parameters
|
|
|
|
|
|
-author
|
|
|
-=====
|
|
|
+Name | Description
|
|
|
+-----|-------------
|
|
|
+topic | MQTT Topic
|
|
|
+message | Text Message
|
|
|
|
|
|
-Ery Lee <ery.lee at gmail dot com>
|
|
|
+## Design
|
|
|
|
|
|
+[Design Wiki](https://github.com/slimpp/emqtt/wiki)
|
|
|
|
|
|
-license
|
|
|
-======
|
|
|
+## License
|
|
|
|
|
|
The MIT License (MIT)
|
|
|
|
|
|
+## Author
|
|
|
+=====
|
|
|
+
|
|
|
+feng at slimchat.io
|
|
|
+
|