With the rapid development of the IoT industry, the MQTT protocol is also used by more and more companies and developers. In the process of learning and using MQTT , a handy client tool can greatly facilitate developers to explore MQTT features and debug IoT applications, and shorten the development cycle.

At present, there are many types of MQTT client tools, and their functional focus is also different. For beginners and even MQTT experts, how to choose a suitable MQTT client tool is a difficult problem.

Based on our own experience, we have screened and sorted out the common client tools on the market, selected the latest and most practical 7 MQTT client tools by 2022, and sorted them by desktop, browser, command line Listed by category. I hope this article can help MQTT developers quickly find a suitable client tool for MQTT connection testing.

How to choose an MQTT client?

MQTT client tools are often used to establish a connection with an MQTT server , and perform operations such as topic subscription and message sending and receiving. An excellent MQTT client tool should have the following characteristics:

  • Support encrypted connection;
  • Support MQTT 5 features;
  • Maintain ease of use on the basis of comprehensive functions;
  • Support multiple clients online at the same time;
  • Cross-platform, can be used under different operating systems;
  • Support MQTT over WebSocket;
  • Advanced features: support for custom scripts, logging, MQTT Payload format conversion, etc.

MQTT desktop client

MQTT X

MQTT X is a cross-platform MQTT 5.0 client tool open sourced by EMQ. It supports macOS, Linux, Windows, and supports MQTT message format conversion.

The user interface of MQTT X simplifies the operation logic of the page in the form of chat software. Users can quickly create connections and save and establish multiple connection clients at the same time, which is convenient for users to quickly test the connection of MQTT/TCP, MQTT/TLS, MQTT/WebSocket / Publish/Subscribe functionality and other features.

MQTT X is committed to creating an elegant and easy-to-use full-platform MQTT client, and has recently released two versions of MQTT X CLI and MQTT X Web. Currently, the number of GitHub Stars has reached 2K, and it has become the most complete MQTT test for usage scenarios. client.

MQTT X

characteristic

  • Cross-platform, supports Windows, macOS and Linux
  • Supports MQTT v3.1.1 and MQTT v5.0 protocols
  • One-way/two-way SSL authentication: supports CA, self-signed certificate, and one-way and two-way SSL authentication
  • Support Light, Dark, Night three theme mode switching
  • Support WebSocket connection to MQTT server
  • Support Hex, Base64, JSON, Plaintext
  • Supports Simplified Chinese, English, Japanese, Turkish and Hungarian
  • Subscribe Topic to support custom color marking
  • Support automatic subscription of $SYS topic, view traffic statistics
  • Custom editing scripts to test and simulate sending and receiving data
  • full logging

MQTT Explorer

MQTT Explorer is a comprehensive MQTT client that provides a structured display and dynamic preview of MQTT topics.

MQTT Explorer also supports difference comparison and visual chart display of received payload messages. Similar to MQTT.fx, MQTT Explorer can only create a single client connection, not multiple clients online at the same time.

MQTT Explorer

characteristic

  • Visualize dynamic previews of Topics and Topic changes
  • Delete reserved Topics
  • Search/Filter Topics
  • Delete Topics recursively
  • Difference view of current and previously received messages
  • Publish Toipcs
  • Draw Digital Topics
  • Keep the history of each topic
  • Dark/Light theme

MQTT.fx

MQTT.fx was developed by Jens Deters personally. MQTT.fx is licensed under Apache License 2.0 but does not provide source code. It is a pity that MQTT.fx has been discontinued for maintenance, and the commercial version MQTT.fx® 5.0 has been developed and distributed by Softblade Corporation, and the software is operated by a paid license.

MQTT.fx is developed using JavaFX technology, which can save multiple connection configurations, support multiple types of encryption methods, specify multiple types of certificates, and specify the use of HTTP proxy servers when creating connections.

In general, MQTT.fx has rich and mature functions, and supports all configuration items that may be encountered in TCP connections, but users can only establish one connection at the same time, which cannot meet the needs of using multiple test connections at the same time. In addition, it does not implement support for WebSocket and cannot be used in the test scenario of MQTT over WebSocket.

MQTT.fx

characteristic

  • Predefined message templates
  • Get broker status through system topic $SYS
  • Memorize recently used topics
  • JavaScript scripting support via Nashorn Engine
  • Support log display, display log information in connection
  • Cross-platform desktop with support for Windows, MacOS and Linux

MQTT online client

MQTT X Web

MQTT X Web is an open source MQTT 5.0 browser client and an online MQTT WebSocket client tool. Developers can use WebSocket to quickly connect to the MQTT server in the browser without downloading and installing MQTT X locally, and develop and debug MQTT services and applications faster.

img

MQTT command line client

MQTT X CLI

MQTT X CLI is a fully open source, powerful and easy-to-use MQTT 5.0 command-line client tool, as well as MQTT X on the command line, designed to help developers quickly develop and debug MQTT services without using a graphical interface with application.

MQTT CLI

characteristic

  • No dependency restrictions : command-line-based installation and use without any environment dependencies
  • Open source : based on the Apache License 2.0 agreement, open source
  • Ease of integration : can be quickly integrated into automated test scripts
  • One-way/two-way SSL authentication : supports CA, self-signed certificate, and one-way and two-way SSL authentication

download

MQTT X CLI can be quickly downloaded and installed on macOS, Linux and Windows systems. It does not require any dependent environment preparation before installation . Just execute commands in the terminal to install and use MQTT X CLI.

quick start

subscription

 mqttx sub -t 'mqttx/cli' -h 'broker.emqx.io' -p 1883

release

 mqttx pub -t 'mqttx/cli' -h 'broker.emqx.io' -p 1883 -m 'hello from MQTTX CLI!'

Post multiple messages

 mqttx pub -t 'mqttx/cli' -h 'broker.emqx.io' -p 1883 -s -M

MQTT X CLI supports a pub command that can publish multiple messages, just need to add a -M parameter and -s parameter to the command when editing. After the input is completed, you can change the line.

MQTT CLI

NanoMQ CLI

NanoMQ is an ultra-lightweight MQTT message server for IoT edge. It also has a built-in powerful MQTT protocol performance test tool bench and MQTT test client.

characteristic

  • Support performance test
  • Support MQTT 5.0
  • Can run at the edge
  • Support reading data from file as payload

quick start

Performance test tool bench

 # 启动 10 个连接,每秒向主题 t 发送 100 条 Qos0 消息,其中每个消息负载的大小为 16 字节
nanomq_cli bench pub -t t -h broker.emqx.io -s 16 -q 0 -c 10 -I 10

# 启动 500 个连接,每个连接使用 Qos0 订阅 t 主题
nanomq_cli bench sub -t t -h broker.emqx.io -c 500

# 启动 100 个连接
nanomq_cli bench conn -h broker.emqx.io -c 100

MQTT test client

 # 向主题 t 发送 100 条 Qos2 消息测试。
nanomq_cli pub -t t -h broker.emqx.io -q 2 -L 100 -m test

# 订阅主题 t
nanomq_cli sub -t t -h broker.emqx.io -q 1

Mosquitto CLI

Mosquitto is an open source (EPL/EDL license) message broker. After installation, two command-line MQTT client tools, mosquitto_pub and mosquitto_sub, are provided by default.

Mosquitto CLI has multiple configuration options, supports TLS certificate connection, connection through proxy server, supports debug mode, and can get more detailed message information in debug mode.

characteristic

  • Lightweight command line tool, supports debug mode
  • Supports encrypted and unencrypted connections to MQTT servers
  • Easy to test on remote server

quick start

subscription

 mosquitto_sub -t 'test/topic' -v

release

 mosquitto_pub -t 'test/topic' -m 'hello world'

Copyright statement: This article is original by EMQ, please indicate the source when reprinting.

Original link: https://www.emqx.com/zh/blog/mqtt-client-tools


EMQX
336 声望436 粉丝

EMQ(杭州映云科技有限公司)是一家开源物联网数据基础设施软件供应商,交付全球领先的开源 MQTT 消息服务器和流处理数据库,提供基于云原生+边缘计算技术的一站式解决方案,实现企业云边端实时数据连接、移动、...