Now, we will use the MQTT.fx GUI utility to generate another MQTT client that publishes another message to the same topic, sensors/octocopter01/altitude. Follow these steps:
- Go to the MQTT.fx window in which you established a connection and subscribed to a topic.
- Click Publish and enter sensors/octocopter01/altitude in the dropdown at the left-hand side of the Publish button.
- Enter the following text in the textbox below the Publish button: 32 f, as shown in the following screenshot:
- Then, click the Publish button. MQTT.fx will publish the entered text to the specified topic.
If you don't want to work with the MQTT.fx utility, you can run another mosquitto_pub command to generate another MQTT client that publishes a message to the topic. You just need to open another Terminal in macOS or Linux, or another Command Prompt in Windows...