Connecting to HiveMQ cloud free account

Hi all,

Apologies in advance if this is a repeat question, but I’m in desperate need of help with implementing TLS.

I’m a complete newbie to TLS / certificates, etc. and I’m finding it very confusing.

My use case is this:

I’ve written a windows application which allows the user to connect to an MQTT broker via raw TCP.
All working great.

But, I need to offer a secure (TLS) connection for when users of the software decide to connect to a cloud broker, and so far I’m at a complete loss as to how to go about this.
Firstly, should I (the software vendor) offer the security or do I leave it up to the user?
Either way, how do I go about doing this?

Ideally I’d like to offer the security as part of the software package, rather than leave it to the user.

One thought is I’d also like to recommend HiveMQ cloud as a cloud option, but what do I need to include in the software to allow this?
Do I have to include some kind of certificate?
I’m really not sure.

On this subject, I’m trying to connect to my free HiveMQ cloud cluster, using MQTT.fx, but MQTT.fx is not connecting.
Could it be because port 8883 is closed on my work network?
Do I need some kind of certificate to do this?

Completely confused!

Any help appreciated.

Thank you

Hi all,

I can answer one of my questions, and that is why MQTT.fx didn’t connect to HIVEMQ cloud:
It connects perfectly well at home, but not in my work place - therefore I can only assume port 8883 is closed at my workplace.

But that still leaves me completely perplexed at how I am going to offer MQTT security with my app. software?



Hi Darren,

In order to check if your machine can connect to an MQTT Broker you can also use another MQTT Client, such as MQTT CLI. For example, to connect to the HiveMQ Cloud broker instance and subscribe to the topic pattern ‘#’:

mqtt subscribe --topic '#' --host --port 8883 --secure --user HiveUser1 --password HiveUser1 --debug --jsonOutput

Note the --debug option – it will produce verbose output that helps to diagnose connection or authorisation issue.

Kind regards,
Dasha from HiveMQ Team