Setting a MQTT server for testing 101

The aim of this quick guide is to show how to setup a MQTT server (mosquitto) in a Debian based computer in order to test MQTT service. These steps can even be followed using one of our readers if you don't have access to your own Linux computer (but our readers require internet access).

The totality of this guide will use Linux terminal.

Steps

    1. Install the required software by executing

sudo apt-get update
sudo apt-get install mosquitto mosquitto-clients

2. Make sure you have the server properly up and running by using

sudo service mosquitto status or sudo service mosquitto start

3. Because the point of this server is to test AdvanNet's MQTTService you only need to subscribe to the test topic to inspect the messages received by using the following command:

mosquitto_sub -h localhost -t test_topic