Go to file
Ery Lee d74daeab12 0.5.1 2015-03-13 20:37:08 +08:00
apps/emqttd 'acceptor_pool' option to 'acceptors' 2015-03-13 20:18:01 +08:00
data mqtt 3.1.1 protocol 2015-01-08 14:25:38 +08:00
deps 0.2 project structure 2014-12-06 19:12:29 +08:00
doc 'acceptor_pool' option to 'acceptors' 2015-03-13 20:18:01 +08:00
plugins add plugins 2015-03-12 12:50:18 +08:00
rel acceptor_pool -> acceptors 2015-03-13 20:29:18 +08:00
scripts 0.3.0 changes 2015-01-18 12:57:33 +08:00
tests add tests 2015-01-11 23:27:20 +08:00
.gitignore add plugins 2015-03-12 12:50:18 +08:00
.gitmodules add tests 2015-01-11 23:27:20 +08:00
.travis.yml add 2015-02-12 21:59:43 +08:00
CHANGELOG.md 0.5.1 2015-03-13 20:37:08 +08:00
LICENSE frame -> packet 2015-01-10 00:00:16 +08:00
Makefile emqttd 2015-03-13 00:07:34 +08:00
README.md 'acceptor_pool' option to 'acceptors' 2015-03-13 20:18:01 +08:00
TODO merge emqttc 2015-03-04 22:11:17 +08:00
go add 2015-01-12 12:58:16 +08:00
rebar upgrade esockd, mochiweb 2015-03-02 01:40:22 +08:00
rebar.config rename project name from 'emqtt' to 'emqttd' 2015-03-10 20:09:13 +08:00

README.md

eMQTT Build Status

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

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

eMQTT requires Erlang R17+.

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/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, [
            {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 emqtt@127.0.0.1

-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 "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)