MQTT X, open sourced by EMQ, is an MQTT 5.0 cross-platform desktop client. MQTT X was born to connect and test various MQTT message servers. It supports the rapid creation of multiple simultaneous online MQTT client connections. It adopts a one-click connection method and a simple graphical interface to help users test MQTT/TCP and MQTT conveniently. /TLS, MQTT/WebSocket connection, publish and subscribe functions, explore more MQTT protocol features .
In the recently released v1.8.0, in addition to optimizing the user experience through the new fast copy connection function, two new usage scenarios have been expanded, that is, the CLI (command line) and the web side (browser web page) have been added. These two new ways of interacting. This makes MQTT X 1.8.0 the most complete MQTT client tool supporting usage scenarios. Users can choose to download the desktop client, use the terminal command line, or quickly complete the MQTT connection test on the desktop browser according to their needs.
Introduction to MQTT X Web
For some new users who experience the MQTT protocol for the first time, it is the primary requirement to quickly understand and use the MQTT protocol. MQTT X Web provides a more convenient way for it: without complicated download and installation steps, just open the page in the browser, you can quickly connect and test MQTT services and applications , and understand and explore the MQTT protocol.
MQTT X Web is an online MQTT 5.0 client tool, that is, an MQTT 5.0 WebSocket client tool running on a browser. It has the following functional characteristics:
- Supports connecting to MQTT services through normal or encrypted WebSocket ports;
- Create, edit, delete and cache connections for connections to facilitate next access;
- Subscription list management for different connections;
- Notifications when messages are published, received, and when new messages are received, and also supports filtering the message list by message type.
MQTT X Web site: https://mqttx.app/en/web
MQTT X Web online use address: http://www.emqx.io/online-mqtt-client
MQTT X Web GitHub repository: https://github.com/emqx/MQTTX/tree/main/web
MQTT over WebSocket
In recent years, with the rapid development of web front-end, new features of browsers emerge one after another, and more and more applications can be implemented on the browser side through the browser rendering engine.
The core of MQTT X Web is to use WebSocket to connect to the MQTT service. Therefore, in terms of functionality, MQTT X Web is not only convenient to use, but also provides the connection test function of MQTT over WebSocket. When you need to use MQTT in web application scenarios, you can connect and use it through WebSocket, use MQTT X Web to debug your MQTT services and applications, speed up your application production and improve stability.
Based on modern browsers
MQTT X Web is developed based on modern browser technology and deploys applications to web pages. Users do not need to download and install the MQTT X package, just open a browser and use it. At the same time, the newly created connection and message information can also be persistently stored in the browser, which is convenient for the next visit.
open source
The MQTT X Web code is consistent with the MQTT X desktop application and MQTT X CLI. It is open source based on the Apache License 2.0 protocol. Advanced users can directly modify and use MQTT X Web in the code repository and deploy it to any environment. .
Develop and debug MQTT services and applications using MQTT X Web
MQTT X Web also uses a graphical page to help you quickly test the MQTT service in the form of a chat interface, which is basically the same as the MQTT X desktop application.
After opening the browser, enter http://www.emqx.io/online-mqtt-client/ to access the MQTT X Web.
For more detailed usage introduction, please refer to the usage documentation of MQTT X: https://mqttx.app/zh/docs/get-started .
In order to test the use of MQTT X Web, we need to prepare an MQTT service. This article will use the free public MQTT server provided by EMQ. The service is created based on the MQTT IoT cloud platform - EMQX Cloud . The server access information is as follows:
- Broker: broker.emqx.io
- TCP Port: 1883
- WebSocket Port: 8083
Create a connection
Click the New Connection button on the page, enter the connection information on the page, and click the upper right corner to quickly create and connect to the MQTT service.
Subscription management
After creating and successfully connecting, click the New Subscription button in the subscription list to pop up the subscription list box, where you can create/cancel subscription operations.
message publishing/receiving
Click the input box at the bottom right of the page, and a message publishing box will pop up. After filling in the Topic and Payload fields, click the publish icon in the lower right corner to publish the message. The message after successful publishing will be displayed on the right side of the message list.
The messages received by the subscribed topic will be displayed on the left side of the message list. You can click the message type switch button in the upper right corner to display only received or sent messages.
Finally, we use the desktop client of MQTT X to connect to the same MQTT service as MQTT X Web to test and verify the functionality of MQTT X Web. First, use MQTT X Web to publish a message, receive it through the MQTT X desktop client, and then use the MQTT X desktop client to send a message to MQTT X Web in reverse. At this point, we can see that both sides have received their respective messages.
So far, we have completed the testing and verification of the MQTT message publish and subscribe function using MQTT X Web. In the next 1.8.1 version, we will continue to optimize the page style, improve the test function, support more MQTT 5.0 attribute settings, etc.
Epilogue
The release of MQTT X Web provides a new option for IoT developers to test MQTT connections. The complete support for command line calls, desktop client downloads and online browsers enables MQTT X 1.8.0 to help users with different usage scenarios to complete the development and debugging of MQTT services or applications, thereby improving The user's own related business capabilities and stability. The easy-to-use test client tool MQTT X combined with the efficient and reliable IoT message server EMQX will help IoT developers build competitive IoT platforms and applications.
Copyright statement: This article is original by EMQ, please indicate the source when reprinting.
Original link: https://www.emqx.com/zh/blog/online-mqtt-client
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。