create emqx project

Ery Lee 35ff84a8b7 doc 11 gadi atpakaļ
apps 35ff84a8b7 doc 11 gadi atpakaļ
data c9d3e2d291 mqtt 3.1.1 protocol 11 gadi atpakaļ
deps 3a6ed9a876 0.2 project structure 11 gadi atpakaļ
doc 35ff84a8b7 doc 11 gadi atpakaļ
plugins 58b1e258c1 add folder 13 gadi atpakaļ
rel 7e6f817519 Merge branch 'dev' of github.com:emqtt/emqtt into dev 11 gadi atpakaļ
tests 68eb225981 add tests 11 gadi atpakaļ
.gitignore a0017c3186 author 11 gadi atpakaļ
.gitmodules 68eb225981 add tests 11 gadi atpakaļ
CHANGELOG.md ccdd0d69b1 clientId length changed 11 gadi atpakaļ
LICENSE 6ff4f59a25 frame -> packet 11 gadi atpakaļ
Makefile fc7cce87e8 deps -> get-deps 11 gadi atpakaļ
README.md 0a4a241be1 Merge branch 'master' into dev 11 gadi atpakaļ
TODO 4ec2b56c9c Merge branch 'dev' of github.com:emqtt/emqtt into dev 11 gadi atpakaļ
go 8cc8046a02 add 11 gadi atpakaļ
rebar 3a6ed9a876 0.2 project structure 11 gadi atpakaļ
rebar.config fdc69f6ea6 fix deps 11 gadi atpakaļ

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.

Cluster

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

on 'host1':

./bin/emqtt start

on 'host2':

./bin/emqtt start

./bin/emqtt cluster emqtt@host1

Run './bin/emqtt 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

@hejin1026 (260495915 at qq.com) @desoulter (assoulter123 at gmail.com)