Connect with MQTT.fx
This article will take MQTT.fx as MQTT client test tool to connect the deployment of EMQX Cloud.
MQTT.fx is the most popular MQTT desktop client tool currently. The major version of MQTT.fx 1.0 is developed by Jens Deters using JavaFX technology, which is a Java virtual machine application. Unfortunately, the maintenance of MQTT.fx has now stopped maintenance and Softblade company has sponsored the development and released its commercial version MQTT.fx® 5.0, which is operated with a fee-based license. MQTT.fx in this article refers to version 1.0 without special instructions.
TCP and TLS protocols are supported but WebSocket.
Prerequisites
- Install MQTT.fx client.
- Already created a deployment in the EMQX Cloud, and the deployment status is running.
Deploy MQTT Broker
To connect your application to the EMQX Cloud, you need to create and configure a deployment.
Serverless Deployment
Create a Serverless deployment in the EMQX Cloud Console.
Once the deployment is created and running, go to the deployment Overview page to find the MQTT connection information, including:
Broker address
Port number (only TLS ports are supported in Serverless)
Serverless deployments require TLS connections. Make sure to download the CA certificate from the Overview page and use port
8883for TLS.Configure the default authentication (username/password) under Access Control -> Client Authentication in the deployment.
For more details, refer to the Serverless Port Guide.
Dedicated Flex or BYOC Deployment
- You can create a Dedicated Flex or BYOC deployment in the EMQX Cloud Console.
- After creation, go to the deployment Overview page to retrieve MQTT connection information, including:
- Broker address
- TCP and TLS port numbers for MQTT and WebSocket (Both TCP and TLS connections are supported).
- Configure the default authentication (username/password) under Access Control -> Client Authentication in the deployment.
For detailed port configurations, see the Dedicated & BYOC Port Guide.
Connection configuration
Broker information
Get the connection address and port in the Deployment Overview (the following xxxxx represents a random port, the specific port information please refer to the information on the deployment overview page).
- Dedicated Flex plan address: domain; port: 1883(mqtt), 8083(ws) is enabled by default, you can enable port 8883(mqtts) and 8084(wss) by configuring TLS/SSL
- BYOC plan address: the domain name specified at deployment time; port: 1883 (mqtt), 8083 (ws), 8883 (mqtts), 8884 (wss)
Authentication
All deployments of the EMQX Cloud have user authentication enabled, so when using MQTT.fx to test the connection, you need to fill in the Username and Password fields.
Set the Username and Password in
Access Control>Authentication, which can be added one by one, or can be imported at once.
Connect
Open connection profile

Create a new connection configuration and fill in the relevant configuration

Connect to MQTT broker

More
For more subscription, publishing and other functions, please refer to: Using MQTT.fx to connect to EMQX Cloud.