Skip to content

mqtt spy_Intro

Bose Ji edited this page Aug 31, 2016 · 2 revisions

Pocket Guide to MQTT Tool : mqtt-spy

There are many tools out there that allow the configuration and testing of MQTT based application. Initially this might seam confusing for many as its a difficult to make a choice.

In this document the focus would be on a particular tool mqtt-spy

mqtt-spy

Here is what the offical detail says:

mqtt-spy is an open source utility intended to help you with monitoring activity on MQTT topics. It's been designed to deal with high volumes of messages, as well as occasional publications.

mqtt-spy is a JavaFX application, so should work on any operating system with an appropriate version of Java 8 installed. It's been tried on various Linux distributions (Mint, Ubuntu, RedHat) and Windows 7/8.

It works using Java 7 or greater one may need to install the latest JVM to run this. And that's the best part, this tool can run on any OS as long as the JVM is available for that OS platform.

In this document we would be using a Windows 7 target machine with Internet connected over Wi-Fi.

Screen Shots

Initial Screen Without Settings

Download

Somehow the download link is not in the same Wiki:

https://github.com/kamilfb/mqtt-spy/wiki/Downloads

Here is the Detailed Wiki for Usage Info and Advanced topics:

https://github.com/kamilfb/mqtt-spy/wiki

Configuration

For the mqtt-spy to work properly the local settings need to saved.

1. Create Local Settings

Click on the Settings

Settings Window

Create the Settings

2. After Successful Confirmation

Configured Settings

First Connection 👍 iot.eclipse.org

In order to test the MQTT operation, the easiest platform is the Eclipse Foundation's own MQTT server.

This server runs on the same name as the website iot.eclipse.org on Socket 1883. These are generally the defaults on the mqtt-spy.

Lets now look at the Steps to Create A connection to Eclipse Foundation's MQTT server

1. Click here on the main window of mqtt-spy

Add Connection

2. Connection Configuration

New Config Connection

3. Set the Eclipse Foundation's MQTT server

Eclipse MQTT Connection

4. Connect to the Broker

Connect to Broker

5. Successful Connection

Success Eclipse MQTT Connection

Secure connection to 🔒 iot.eclipse.org

The Eclipse Foundation's MQTT server also provides a encrypted channel for MQTT. Though this is not completely secure but its helpful to test how a TLS connection would look like. There are other document consisting of connection with AWS-Iot Network which would deal a bit deeper into this.

Just small Changes in Settings

Secure Settings

Successful Secure Connection

Success Secure Eclipse MQTT Connection