preface

In learning and using MQTT, a handy client tool can greatly facilitate the exploration of MQTT features and debugging of functional components. Developers from around the world have developed a number of client-side testing tools for THE MQTT protocol, based on different operating systems and platforms.

There is a wide variety of client tools with different focus and quality levels, so choosing an APPROPRIATE MQTT client tool can be a challenge for beginners and even MQTT experts.

This article will collect as much as possible and make a comprehensive evaluation of various MQTT client tools on the market for readers’ reference.

Features required by MQTT client tools

MQTT client tools are often used to establish connections to MQTT brokers for topic subscriptions, messaging, and so on. The functional characteristics of an MQTT client tool can be evaluated in terms of:

  • The tools at each stage of use need to provide as comprehensive a parameter configuration capability as possible, using all features of MQTT, so that users can be simulated for any usage scenario and usage style. This part of the features include support client authentication, support the configuration of certificates and a variety of encryption connection, support MQTT connection, publish, subscribe process of multiple parameters configuration, support MQTT 5, etc.
  • Improve user interaction convenience on the basis of comprehensive functions;
  • Provide other extended functions, such as supporting multiple client connections at the same time, MQTT protocol debugging;
  • Cross-platform and can be used on different operating systems

Based on the characteristics of each client tool, this paper introduces the evaluation from the above points. The client tools are as follows:

  • Mosquito CLI
  • MQTTX
  • MQTT.fx
  • MQTT Box
  • mqtt-spy
  • MQTT Lens

Mosquito CLI

Mosquitto_pub and MOSQUITto_SUB Command line MQTT client tools mosquitto_PUB and mosquitto_SUB command line MQTT client tools mosquitto_SUB are mosquitto_PUB and mosquitto_SUB by default.

Project address: Github Mosquitto

Mosquito.com to download it

Mosquito CLI has several configuration options, including support for TLS certificate connection, connection through a proxy server, and debug mode, where more detailed message information can be retrieved.

The Mosquito CLI is lightweight and compact enough to be easy to install to set up multiple MQTT clients in parallel with multiple connections to do publish/subscribe testing of messages.

It is also very easy to use, the default environment provides only a few parameters to use:

## Enable DEBUG mode to subscribe to TestTopic /# topics
wivwiv-mac:workspace emqtt$ mosquitto_sub -t "testtopic/#" -d
Client mosqsub/66418-wivwiv-ma sending CONNECT
Client mosqsub/66418-wivwiv-ma received CONNACK
Client mosqsub/66418-wivwiv-ma sending SUBSCRIBE (Mid: 1, Topic: testtopic/#, QoS: 0)
Client mosqsub/66418-wivwiv-ma received SUBACK
Subscribed (mid: 1): 0
Client mosqsub/66418-wivwiv-ma received PUBLISH (d0, q0, r0, m0, 'testtopic/1'. (5 bytes)) Hello## Post a message to the TestTopic /1 topic
mosquitto_pub -t "testtopic/1" -m "Hello"
Copy the code

Mosquitos installation details about mosquitos and the mosquitOS CLI can be found on mosquitos website.

MQTTX

MQTTX is a cross-platform visualization MQTT client tool developed by EMQ and open source under the Apache License 2.0 protocol.

Project address: Github MQTTX

Github MQTTX Release

MQTTX has the following features:

  • Any MQTT Broker connection can be created
  • Support MQTT/WebSocket connections and MQTT/TCP connections
  • Support subscription topics
  • Supports message sending and receiving
  • Cross-platform desktop, supporting Windows, MacOS, and Linux

MQTTX is the latest product launched using Electron cross-platform technology for a beautiful interface and low resource footprint. MQTTX changes the common single client mode in interaction, organizing client information according to the Broker configuration, allowing multiple client information to be stored in the same Broker configuration. To send and receive messages in the interactive form of message chat, allowing multiple client connections to be established at the same time and freely switch to communicate with each other, with better interactivity, greatly improving the efficiency of interactive debugging.

MQTTX is currently available in v1.1.1, with more features in development.

MQTT.fx

MQTT. Fx is a mainstream MQTT client developed by Jens Deters to quickly verify that it is possible to interact with IoT Hub services to publish or subscribe messages. MQTT.

Project address: no source code provided

Download it at mqtt.fx

MQTT FX has the following features:

  • Predefined message templates
  • By system theme$SYSGetting Broker status (HiveMQ and Mosquitto support)
  • Remember recently used themes
  • Support for JavaScript through Nashorn Engine
  • Supports log display and displays log information about connections
  • Cross-platform desktop, supporting Windows, MacOS, and Linux

MQTT. Fx is an established MQTT client tool. Azure IoT Hub, AWS IoT, Ali Cloud IoT and other cloud service providers related product documentation tutorials all take MQTT. Mqtt.fx was developed using JavaFX technology, and due to the Java virtual machine, there may be a lag experience on some older machines.

Mqtt. FX can save multiple connection configurations, support multiple types of TCL encryption, and specify multiple types of certificates. The connection can be created using an HTTP proxy server, and the overall publish and subscribe function is relatively smooth to use once the connection is successful. The Topics Collector function can find that subscribing to Topics via other means such as broker-side proxies is a highlight. Mqtt.fx also supports connection testing for Google Cloud Iot.

Mqtt. fx has the most advanced features: support for executing JavaScript function scripts, using JavaScript code written by Nashorn Engine users to access Java methods and fields to implement functionality extensions. Familiarity with the MQTT.FX API allows users to write business-specific test scripts, simulate sensor reporting, and even performance testing tools.

If you’re using HiveMQ or Mosquitto Broker, MQTT.FX provides mosquitmosquitos with a special TAB to visualize the status of the Broker by subscribes to their system topic (the topic to publish the running information of the Broker). System information, such as the version and time of the Broker, and operation information, such as the number of clients and messages, network traffic and load status, can be obtained in real time.

In general, MQTT.FX has a rich and mature set of features that support all configuration items you might encounter in a TCP connection, with the exception of interactivity, where users can only establish one connection at a time, not multiple test connections at the same time. It also does not implement WebSocket support and cannot be used in MQTT over WebSockets test scenarios.

MQTT Box

MQTT Box is a personal MQTT client tool developed by Sathya Vikram. It was originally only used in Chrome as a browser extension installation, and later rewritten as open source to become a desktop cross-platform independent software.

Project address: GitHub MQTTBox

Download address: workswithweb.com/mqttbox.htm…

MQTT Box has the following features:

  • By supporting Chrome OS, Linux, Mac OS, Windows Chrome storage is easy to install, support Linux, Mac OS, Windows standalone installation
  • Supports MQTT, MQTT over WebSocket, and multiple TCP encryption connections
  • Save a history of the delivery
  • Copy/paste messages from history
  • Save the subscription message history
  • Simple performance tests that test the Broker’s load and visualize the results on a chart

MQTT Box also adopts the Electron cross-platform technology, which has a simple and direct interface and supports multiple clients to be online at the same time, but it is still inconvenient to switch between clients and send messages to each other. MQTT Box is a great MQTT client tool to try out with Chrome’s powerful cross-platform features and simple load testing capabilities.

mqtt-spy

Mqtt-spy is part of Eclipse Paho and Eclipse IoT and runs on Java 8 and JavaFX by launching JAR files directly. Mqtt-spy has a nice interactive way to expose the basic MQTT publish/subscribe mechanism.

Project address: GitHub MQTT-Spy

Download: github.com/eclipse/pah…

Mqtt-spy has the following features:

  • Support MQTT and MQTT over WebSocket
  • Interactive, publish and subscribe at the same time, and connect multiple brokers in different tabs
  • You can close different areas of the PUB/Sub window (publications, new subscriptions, subscriptions, and messages) to make room for the space currently in use
  • The search function allows you to find commonly used MQTT messages and to output/subscribe messages to standard output or to record them to files for subsequent analysis

Mqtt-spy does not provide a standalone installation package and requires users to install the Java runtime environment before using it. But once launched, MQTT-Spy is a user-friendly experience, with boot functionality that makes it easy for newcomers to MQTT to connect to a common MQTT Broker to explore. Mqtt-spy’s functional interface is a bit complex, but once you become familiar with the functionality of each component it becomes a great tool for development and debugging. It is also important to note that MQTT-Spy has a poor performance and stability. It is also possible that the version I am using is in the latest Beta, causing frequent stuttering and false death after connecting multiple brokers.

MQTT Lens

MQTT Lens is a Chrome extension tool that can be installed through the Chrome Web App Store. The MQTT Lens interface is concise and provides basic publish-subscribe functionality.

Download: Chrome Web Store

MQTT Lens has the following features:

  • Accept connections to multiple brokers at the same time, with different color associations
  • The interface for subscribing, publishing, and viewing all incoming messages is simple and easy to master
  • Support MQTT and MQTT over WebSocket

MQTT Lens is simple enough, but provides basic MQTT and MQTT over WebSocket connectivity capabilities that can be quickly used to start exploring.


For more information, please visit our official website emqx. IO, or follow our open source project github.com/emqx/emqx. For more details, please visit our official documentation.

EMQ X link: www.emqx.io/cn/blog/mqt… Copyright: EMQ