The EMQ broker is one of the most interesting MQTT brokers.
EMQ is fully open source and licensed under the Apache Version 2.0. EMQ implements both MQTT V3.1 and V3.1.1 protocol specifications, and supports MQTT-SN, CoAP, WebSocket, STOMP and SockJS at the same time.

EMQ provides a scalable, reliable, enterprise-grade MQTT message Hub for IoT, M2M, Smart Hardware and Mobile Messaging Applications. Sensors, Mobiles, Web Browsers and Application Servers could be connected by EMQ brokers with asynchronous PUB/SUB MQTT messages.

Take a look at emqtt.io for more info.

EMQ is written in erlang, so to compile and run EMQ you have to install erlang

Let’s start

sudo apt-get update
sudo apt-get install wget
sudo apt-get install libssl-dev
sudo apt-get install ncurses-dev

wget http://www.erlang.org/download/otp_src_19.2.tar.gz

This will download about 60MB of tarballed archive.

Time to compile ERLANG

tar -xzvf otp_src_19.2.tar.gz
cd otp_src_19.2/
./configure

it will take about 150 seconds

Build erlang , this could be a very long operation, on raspberry pi it will take about 200 minutes, on raspberry pi 3 it will take about 10m36.317s running make -j 4 (on raspberry pi you have to run make without options)

make -j 4 


sudo make install
cd ..
rm otp_src_19.2.tar.gz
sudo rm -R otp_src_19.2/

So, now you have installed erlang. Let’s install EMQ:

git clone https://github.com/emqtt/emq-relx.git

Build the emqtt broker running the following command.

cd emq-relx && make

Note that in this case you cannot use the -j option of the make command, because the build will fail.

cd _rel/emqttd && ./bin/emqttd console

Now you are running your EMQ broker.

Gg1.