MQTT.fx is a Java program to send and receive MQTT messages. You can use it to check if your program send messages, or trigger your program by sending messages to it.
Getting Started
Below is given the main window view of the MQTT.fx. While at the top of the window is given an option to setup connection with the broker (either ad-hoc or profile), the tabs undrneath are available for each use case.
1. Connection Profiles
The connection to MQTT broker can be defined in various forms. This setting is done with the profile option as shown below. As a result, we can store a set of profiles for a single MQTT broker such as with or without security.
The Broker settings (for example, broker address, port, SSL, etc.) are defined as illustrated in the figure below.
2. Setup Connection
Once the profile settings are defined, the connection can be done either via ad-hoc or profile method. Ad-hoc uses the address and port number of the Broker to establish connection. A sample connection showing the two methods is depicted in the figure below.
3. Publish
After establishing connection with the broker, use the publish tab to publish messages. Insert the topic and payload of the message on the highlighted positions, and select the QoS. Bear in mind that, if the retained checkbox is not highlighted, the message can’t be reterived while subscribig because the broker don’t save the message.
4. Subscribe
Messages are subscribed from the broker using their topics, and wildcard (#) can be used to derive a set of messages. Insert the topic in the search tab, and the returned outputs are displayed as indicated in the figure below.
20,981 thoughts on “Using MQTT.fx Application”