Go to file
Feng Lee 61a780f445 Semantic Versioning 2015-01-08 15:00:43 +08:00
apps/emqtt fix wildcard topics match 2015-01-08 14:40:05 +08:00
deps 0.2 project structure 2014-12-06 19:12:29 +08:00
doc design 2014-12-10 19:42:03 +08:00
plugins add folder 2012-12-27 16:42:59 +08:00
rel rewrite all modules 2014-12-08 17:40:45 +08:00
.gitignore author 2014-12-10 14:20:00 +08:00
CHANGELOG.md Semantic Versioning 2015-01-08 15:00:43 +08:00
LICENSE author... 2014-12-10 18:21:37 +08:00
Makefile deps -> get-deps 2015-01-08 14:41:32 +08:00
README.md thanks @desoulter 2015-01-08 14:51:11 +08:00
TODO fix wildcard topics match 2015-01-08 14:40:05 +08:00
rebar 0.2 project structure 2014-12-06 19:12:29 +08:00
rebar.config fix mochiweb git 2015-01-08 14:44:21 +08:00

README.md

eMQTT

eMQTT is a scalable, fault-tolerant and extensible mqtt broker written in Erlang/OTP.

eMQTT support MQTT V3.1 Protocol Specification.

eMQTT requires Erlang R17+.

Startup in Five Minutes

$ git clone git://github.com/slimpp/emqtt.git

$ cd emqtt

$ make && make dist

$ cd rel/emqtt

$ ./bin/emqtt console

Deploy and Start

start

cp -R rel/emqtt $INSTALL_DIR

cd $INSTALL_DIR/emqtt

./bin/emqtt start

stop

./bin/emqtt stop

Configuration

etc/app.config

{emqtt, [
   {auth, {anonymous, []}}, %internal, anonymous
   {listen, [
       {mqtt, 1883, [
           {max_conns, 1024},
           {acceptor_pool, 4}
       ]},
       {http, 8883, [
           {max_conns, 512},
           {acceptor_pool, 1}
       ]}
   ]}
]}

etc/vm.args


-sname emqtt

-setcookie emqtt

When nodes clustered, vm.args should be configured as below:

-name emqtt@host1

Cluster

Suppose we cluster two nodes on 'host1', 'host2', Steps:

on 'host1':

./bin/emqtt start

on 'host2':

./bin/emqtt start

./bin/emqtt_ctl cluster emqtt@host1

Run './bin/emqtt_ctl cluster' on 'host1' or 'host2' to check cluster nodes.

HTTP API

eMQTT support http to publish message.

Example:

curl -v --basic -u user:passwd -d "topic=/a/b/c&message=hello from http..." -k http://localhost:8883/mqtt/publish

URL

HTTP POST http://host:8883/mqtt/publish

Parameters

Name Description
topic MQTT Topic
message Text Message

Design

Design Wiki

License

The MIT License (MIT)

Author

feng at emqtt.io

Thanks

@desoulter (assoulter123 at gmail.com)