There is another very popular utility to generate MQTT clients that can subscribe to topics and publish to topics: MQTT-spy. This utility is open source and can run on any computer that has Java 8 or a higher version installed on it. You can find more information about MQTT-spy at http://kamilfb.github.io/mqtt-spy. The options to establish a connection with an MQTT server with a certificate authority certificate file are similar to the ones we analyzed for MQTT.fx. However, in case you also want to work with this utility, it is convenient to analyze them in detail.
Now, we will use the MQTT-spy GUI utility to generate another MQTT client that uses an encrypted connection to publish messages to the same topic, that is, sensors/drone01/altitude
. Follow the next steps:
Launch MQTT-spy.
Select Connections | New connection. The Connection list dialog box will appear.
Click on the Connectivity tab and select MQTT 3.1.1 in the Protocol version dropdown...