Install the EMQ broker (also known as emqttd) on the Raspberry Pi (raspbian)

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

This will download about 60MB of tarballed archive.

Time to compile ERLANG

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)

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

Build the emqtt broker running the following command.

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

Now you are running your EMQ broker.

Gg1.

You may also like...

2 Responses

  1. Nahuel says:

    That was awesome! not 1 error following this guide!
    I’d like to configure it to auto start as a daemon when the Rpi is started…

    How do I do that?

    Thanks!

  2. Matt Gibson says:

    HI, I’m also with Nahuel. Great instructions, not 1 issue other than starting at boot, any pointers?

Leave a Reply

Your email address will not be published. Required fields are marked *