eMQTT is a clusterable, massively scalable, fault-tolerant and extensible MQTT V3.1/V3.1.1 broker written in Erlang/OTP.
eMQTT is aimed to provide a solid-stable broker that could be clusterd to support millions of connections and clients.
eMQTT is cross-platform, could run on windows, linux, freebsd and mac os x.
eMQTT requires Erlang R17+ to build from source.
MQTT V3.1.1 and V3.1 protocol support
QoS0, QoS1, QoS2 Publish and Subscribe
Session Management and Offline Messages
Retained Messages
Passed eclipse paho interoperability tests
Massive Connections Clients Support
Cluster brokers on servers or cloud hosts
Bridge brokers locally or remotelly
Dowload binary packages from [http://emqtt.io/downloads](http://emqtt.io/downloads].
Please build from source if no packages for your platform, or contact us.
Extract tgz package to your installed directory. for example:
tar xvf emqtt-ubuntu64-0.3.0-beta.tgz && cd emqtt
Startup console for debug:
cd emqtt && ./bin/emqtt console
You could see all RECV/SENT MQTT Packages on console.
Start as daemon:
cd emqtt && ./bin/emqtt start
eMQTT occupies 1883 port for MQTT, 8083 for HTTP API.
cd emqtt && ./bin/emqtt_ctl status
cd emqtt && ./bin/emqtt stop
{emqtt, [
%Authetication. Internal, Anonymous Default.
{auth, {anonymous, []}},
{access, []},
{session, [
{expires, 1}, %hours
{max_queue, 1000},
{store_qos0, false}
]},
{retain, [
{store_limit, 100000}
]},
{listen, [
{mqtt, 1883, [
{max_conns, 1024},
{acceptor_pool, 4}
]},
{http, 8083, [
{max_conns, 512},
{acceptor_pool, 1}
]}
]}
]}
-name emqtt@127.0.0.1
-setcookie emqtt
Suppose we cluster two nodes on 'host1', 'host2', Steps:
configure 'etc/vm.args':
-name emqtt@host1
then start:
./bin/emqtt start
configure 'etc/vm.args':
-name emqtt@host2
./bin/emqtt start
Cluster from 'host2':
./bin/emqtt_ctl cluster emqtt@host1
or cluster from 'host1':
./bin/emqtt_ctl cluster emqtt@host2
then check clustered nodes on any host:
./bin/emqtt_ctl cluster
eMQTT support HTTP API to publish message from your APP to MQTT client.
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
HTTP POST http://host:8083/mqtt/publish
| Name | Description |
|---|---|
| qos | QoS(0, 1, 2) |
| retain | Retain(0, 1) |
| topic | Topic |
| message | Message |
feng@emqtt.io