MQTT native subscriptions (cloud 2.0) and HiveMQ cloud

I have set up an MQTT broker in HiveMQ (cloud) to monitor some sensoring data. This seems to be working properly, as I can subscribe to the topic with mosquitto-cli and view the output. For me, the next step is to get the data into influxdb. For ease of use, I tried using the cloud 2.0 native subscriptions. I’m using the hostname & port provided by HiveMQ and the basic security details, yet I’m always getting the following error:
Failed to connect to a broker using tcp:// and the credentials provided

Any ideas as to what I’m doing wrong? Thanks!

Hello @JelleVE,
I’m not that familiar with the native subscriptions.
Have you seen these resources:

From the error it seems like your security details are wrong?
@Jay_Clifford have you seen this before?

I think I more or less know what the issue is: I’ve managed to set up Telegraf, but ran into a similar issue.
The issue with Telegraf was that I was using the tcp protocol instead of ssl. I reverted to a free account so I can’t test native subscriptions anymore, but maybe I should have added ‘ssl://‘ explicitly to the hostname? It seemed to default to tcp when I didn’t.

1 Like

Hi @JelleVE,
Glad you got it sorted and exactly that. When using port 8883 you are required to use certificates which falls under the ssl:// URL.