HiveMQ
HiveMQ Cloud Quick Start Guide :: HiveMQ Documentation
This tutorial is meant to get you familar with how MQTT works. It should take about 10-20 minutes depending on your comfort working with the command line and terminal.
To test things out, you can install the MQTT CLI and run some commands in the terminal.
If you are using a macOS, it is recommended that you use Homebrew to install. Follow the instructions in the link above. The only thing thing was that I had to install a Java update on my Macbook M2, it seems the latest macOS has Java disabled (?)
Open a new terminal window and start the MQTT CLI
mqtt sh
con -h 80cd98a8ff724b559bad56104395d810.s1.eu.hivemq.cloud -p 8883 -s -u haystack -pw Maker2024
Let’s refer to this as client #1. Nothing will happen when you connect, you may see some information on the terminal, but nothing is suppose to happen. But we are connected and things will happen, eventually. Leave this terminal window (do not close out), and open a new Terminal session (CMD + T for a new tab or CMD + N for a new window).
Repeat step 3 in the new terminal session. Same exact connection code. You do not need to use a different user account. This is simply a permission access to engage with the HiveCloud Broker, a user can connect as many clients as they would like. Once you have this connected, let’s refer to this as client #2.
Topics are sort of like a radio station or channel. Clients can either publish to a topic, subscribe to a topic, or both. Subscribe client #2 by entering the following command.
sub -t testTopic -s