Skip to content

MQTT Testing and Debugging Using MQTT.fx HiveMQ Cloud Edition

by Jens Deters
(updated on ) 11 min read

IoT Developers using the MQTT protocol are often on the lookout for MQTT testing tools that aid in identifying the root causes of problems by providing detailed logs, error messages, and diagnostic information. MQTT.fx is a graphical user interface (GUI) based tool used for MQTT debugging and testing. The tool features HiveMQ Cloud Edition, which makes the development and testing of IoT applications in the cloud simpler and more effective. In this article, we will show how to use MQTT.fx HiveMQ Cloud Edition to test and debug MQTT communication.

Test, Deploy, and Scale IoT Faster with MQTT.fx

The HiveMQ Cloud Edition of MQTT.fx is a special version customized exclusively for ease-of-use with HiveMQ Cloud, a fully-managed, self-service MQTT platform that allows companies to develop, test, deploy, and scale production of IoT use cases without the large investment and complexity of maintaining their own infrastructure.

The MQTT.fx is an easy-to-use front-end for the HiveMQ MQTT client library and is used by developers, testers, and system integrators who are working with MQTT. In addition to MQTT.fx HiveMQ Cloud Edition, MQTT.fx is available for MacOS and Windows. It can be used for:

  • Debugging and testing MQTT applications

  • Simulating MQTT clients for development

  • Monitoring and analyzing message traffic in real-time

  • Experimenting with different MQTT features and configurations

Features and Functions of MQTT.fx HiveMQ Cloud Edition

An overview of the features and functions of MQTT.fx include:

  • MQTT Client: MQTT.fx can act as an MQTT client, allowing users to connect to an MQTT broker, publish messages to topics, subscribe to topics, and receive messages.

  • User-Friendly Interface: The tool offers a clean and intuitive GUI, making it accessible to both experienced developers and those new to MQTT.

  • Message Monitoring: Users can monitor messages sent and received, enabling effective debugging and analysis of MQTT traffic.

  • Support for Various MQTT Versions: The tool is compatible with different versions of the MQTT protocol, including v3.1, v3.1.1 as well as v5.0.

  • Payload Visualization: It allows users to view the payload in different formats, such as plain text, hexadecimal, Base64, or even Sparkplug Payload, making it easier to analyze the content.

  • Connection Profiles: Users can create and save multiple connection profiles, which helps in managing connections to different MQTT brokers.

  • Security Features: MQTT.fx supports secure connections using SSL/TLS and client certificates, allowing for encrypted communication with the broker.

  • Scripting Support: MQTT.fx provides support for running custom scripts, which can automate various tasks or extend functionality.

  • Retained Message Indication: Clearly indicates which messages are retained, helping you understand the current state of the broker.

  • Eclipse Sparkplug Support: MQTT.fx has a Sparkplug message monitor and a Sparkplug messages editor that offers a UI to create and edit Sparkplug messages.

In addition to the primary version of MQTT.fx, a free special edition for HiveMQ Cloud is available. The integration of this special edition of MQTT.fx for HiveMQ Cloud offers a seamless way to develop, test, and manage IoT applications.

By leveraging HiveMQ Cloud’s scalable and secure infrastructure, along with MQTT.fx’s intuitive interface, developers and engineers can accelerate the deployment of robust and scalable IoT solutions.

How to Use MQTT.fx with HiveMQ Cloud?

1. Get your free copy of MQTT.fx

MQTT.fx desktop installers are available for Windows and MacOS at the Softblade download page: https://softblade.de/en/download-hivemq-cloud-edition/

MQTT.fx HiveMQ Cloud Edition InstallerMQTT.fx HiveMQ Cloud Edition Installer

Once the installer has been loaded, run it on your machine and install MQTT.fx.

Here’s how to run MQTT.fx to connect to your HiveMQ Cloud instance and create your connection profile.

2. Connect MQTT.fx to HiveMQ Cloud

Connecting MQTT.fx to HiveMQ Cloud is straightforward. Follow these steps to get started:

a. Set-Up HiveMQ Cloud

First, you need a HiveMQ Cloud account. If you don’t have one, you can sign up here. Once signed-up, create an MQTT cluster by following the instructions provided.

b. Retrieve Connection Details

After setting-up the cluster, go to the “Cluster Details” page of your cluster. You will need the Cluster URL from the “Overview” page and a username and password of a user found on the “Access Management” page.

c. Configure MQTT.fx

Now open MQTT.fx and create a new connection profile.

New Connection Profile on MQTT.fxNew Connection Profile on MQTT.fx

There is an extra HiveMQ Cloud connection profile available for easy and straightforward configuration:

HiveMQ Cloud Connection on MQTT.fxHiveMQ Cloud Connection on MQTT.fx

  • Profile Name: Choose a name for your connection profile

  • Broker Address: Enter the Cluster URL of your HiveMQ Cloud instance

  • Client ID: Enter your desired client ID or let MQTT.fx generate a unique ID

  • Username/Password: Enter the username and password if authentication is required by your HiveMQ Cloud setup.

  • MQTT Version: MQTT v5.0 is selected by default and also MQTT v3.1.1 can be chosen

  • TLS/SSL on port 8883 is automatically used.

Click Apply or OK to store the connection profile.

d. Connect and Play

To connect to HiveMQ Cloud make sure the right connection profile is chosen in the main window of MQTT.fx and click Connect.

The status indicator in the upper right corner of the main screen should turn to green and the lock indicates a secure MQTT v5.0 connection:

Secure MQTT v5.0 connection Status Indicator on MQTT.fxSecure MQTT v5.0 connection Status Indicator on MQTT.fx

In addition, the Log tab shows the debug output of the connection attempt:

The Log Tab Showing Debug Output on MQTT.fxThe Log Tab Showing Debug Output on MQTT.fx

Now, you can subscribe to topics, publish messages, and monitor your MQTT traffic.

3. Use MQTT.fx for Testing

Publish the MQTT Message:

Publishing the MQTT Message for TestingPublishing the MQTT Message for Testing

Subscribe and Receive MQTT Messages:

Subscribe and Receive MQTT MessagesSubscribe and Receive MQTT Messages

Debug Logs Using MQTT.fx:

Debug Logs Using MQTT.fxDebug Logs Using MQTT.fx

Next Steps

This is how simple it is to use MQTT.fx HiveMQ Cloud Edition for testing your IoT applications. As a next step, if you are looking to scale your IoT applications or take them into production, HiveMQ Cloud Starter allows you to rapidly procure a production-ready MQTT platform based on hourly usage, with unlimited connections and devices.

Please get in touch if you have any questions about MQTT.fx or try HiveMQ Cloud Starter today.

Sign up for HiveMQ Cloud now

Jens Deters

Jens Deters has held various roles in IT and telecommunications over the past 22 years: software developer, IT trainer, project manager, product manager, consultant and branch manager. Today Jens leads the Professional Services Team at HiveMQ. As a long-time expert in MQTT and IIoT and developer of the popular GUI tool MQTT.fx, he and his team support HiveMQ customers every day in implementing the world's most exciting (I)IoT UseCases at leading brands and enterprises.

  • Contact Jens Deters via e-mail
HiveMQ logo
Review HiveMQ on G2