Testing MQTT with Postman and free HiveMQ cloud

Hi,
I am new at MQTT and HiveMQ.
Currently, I want to get familiar with this technology. First steps with NodeJS and the public broker was straight forward. I also was able to use Postman to publish/subscribe messages. The HiveMQ blog posts helped a lot.

But then I want to use the free cluster. Adapting the NodeJS example was a trial and error mission but at the end it worked. Suggestion for improvement: /blog/ultimate-guide-on-how-to-use-mqtt-with-node-js/ should also mention how to use the cluster. After searching web and trying, I found out that I have to use tls:// instead of mqtt://

But now I am coming to my issue.
I am not able to use Postman to communicate with the HiveMQ free cluster.
What I did in Postman:
Using mqtts://:.s1.eu.hivemq.cloud:8883 for connecting to
Set basic authentication with the same credentials as for my working NodeJS example
Enabled “Enable server certificate verification”
When I hit connect I am getting following:
Couldn’t connect to broker
0x87 - Not authorized
In detail
CONNACK
cmd: “connack”
length: 67
sessionPresent: false
reasonCode: 135
properties
reasonString: “Please check the URL and if your MQTT client supports TLS SNI”

I searched for this topic also and found:

Postman Now Supports MQTT | Postman Blog (search for SNI)
So is this a Postman issue?

Here also the suggestion for improvement: blog/exploring-postman-mqtt-integration-with-hivemq/ should also explain who to use the broker with TLS.

Thanks for your support

Hello @blub

To establish a TLS connection to the HiveMQ Cloud (Serverless), you must ensure that your device/client supports and uses the TLS protocol extension called “SNI” (Server Name Indication). This TLS extension provides the server’s hostname in the “Client Hello” TLS packet.

I have performed some tests with my Serverless broker and I see the same issue you described. While trying with Starter broker where SNI is not required I was able to connect without any issue.

It’s a Postman MQTT client implementation issue. I’m using the latest Postman version 11.7.0.

Kind regards,
Diego from HiveMQ Team

1 Like

Thanks for the confirmation that it is a Postman issue and that it is working with the Starter plan.