create emqx project

Ery Lee 5df03ba938 access test před 11 roky
apps 5df03ba938 access test před 11 roky
data c9d3e2d291 mqtt 3.1.1 protocol před 11 roky
deps 3a6ed9a876 0.2 project structure před 11 roky
doc 3c0c394621 acl doc před 11 roky
plugins 87eaba55c7 add plugins před 11 roky
rel 2a9653f8a8 emqttd_ctl vm před 11 roky
scripts f3057c08e4 0.3.0 changes před 11 roky
tests 68eb225981 add tests před 11 roky
.gitignore b15dd90ea1 ignore log před 11 roky
.gitmodules 68eb225981 add tests před 11 roky
.travis.yml db6d9cc49b add před 11 roky
CHANGELOG.md 3c0c394621 acl doc před 11 roky
LICENSE 6ff4f59a25 frame -> packet před 11 roky
Makefile 554a7cbbd0 emqttd před 11 roky
README.md 42c220cfa5 Merge branch 'master' of github.com:emqtt/emqtt před 11 roky
TODO 3c0c394621 acl doc před 11 roky
go 8cc8046a02 add před 11 roky
rebar 2d2aa2f79a upgrade esockd, mochiweb před 11 roky
rebar.config 1752fc6c89 esockd 2.* před 11 roky

README.md

eMQTTD Build Status

eMQTTD is a clusterable, massively scalable, fault-tolerant and extensible MQTT V3.1/V3.1.1 broker written in Erlang/OTP.

eMQTTD support MQTT V3.1/V3.1.1 Protocol Specification.

eMQTTD requires Erlang R17+.

Benchmark

Benchmark 0.5.4-alpha on a ubuntu/14.04 server with 8 cores, 32G memory from QingCloud:

200K Connections, 200K Topics, 20K Messages/sec, 20Mbps In/Out with 7G Memory, 40%CPU/core

NOTICE

eMQTTD still cannot handle massive retained messages.

Featues

Full MQTT V3.1.1 Support

Both V3.1.1 and V3.1 protocol support

QoS0, QoS1, QoS2 Publish and Subscribe

Session Management and Offline Messages

Retained Messages

TCP/SSL connection support

$SYS/borkers/# support

Passed eclipse paho interoperability tests

Clusterable, Massively Scalable

Massive Connections Clients Support

Cluster brokers on servers or cloud hosts

Bridge brokers locally or remotelly

Startup in Five Minutes

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

$ cd emqttd

$ make && make dist

$ cd rel/emqttd

$ ./bin/emqttd console

Deploy and Start

start

cp -R rel/emqttd $INSTALL_DIR

cd $INSTALL_DIR/emqttd

./bin/emqttd start

stop

./bin/emqttd stop

Configuration

etc/app.config

 {emqttd, [
    {auth, {anonymous, []}}, %internal, anonymous
    {listen, [
        {mqtt, 1883, [
            {acceptors, 4},
            {max_clients, 1024}
        ]},
        {mqtts, 8883, [
            {acceptors, 4},
            {max_clients, 1024},
            %{cacertfile, "etc/ssl/cacert.pem"}, 
            {ssl, [{certfile, "etc/ssl.crt"},
                   {keyfile,  "etc/ssl.key"}]}
        ]},
        {http, 8083, [
            {acceptors, 1},
            {max_clients, 512}
        ]}
    ]}
 ]}

etc/vm.args


-name emqttd@127.0.0.1

-setcookie emqtt

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

-name emqttd@host1

Cluster

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

on 'host1':

./bin/emqttd start

on 'host2':

./bin/emqttd start

./bin/emqttd_ctl cluster emqttd@host1

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

HTTP API

eMQTTD support http to publish message.

Example:

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

URL

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

Parameters

Name Description
qos QoS(0, 1, 2)
retain Retain(0, 1)
topic Topic
message 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)