MQTT brokers
There are many open source and paid MQTT brokers available for use, such as:
- Mosquitto
- HiveMQ
- Apache ActiveMQ
- RabbitMQ
- Erlang MQTT (EMQ)
We will use EMQ, which is an open source and massively scalable MQTT broker for connecting our Raspberry Pi to the cloud and communicating with it.
MQTT implementation
Now we will implement the MQTT broker and client.
MQTT broker
Here we will install the EMQ broker on our Windows server, which is our laptop in this case, and create an MQTT client application, which will run on Raspberry Pi:
- Download a stable release package of the EMQ broker for Windows (or the OS of your server) using this link: http://emqtt.io/downloads.
- Unzip the downloaded package and place it in any folder of your choice.
- Open the Command Prompt and move to the
bin
folder of the package using thecd
command as shown:

- Start the broker in console mode using the
emqttd
command:

- On a successful start, the
Erlang
console window will pop up as shown in Figure 3.10. If it doesn't, terminate...