I am trying to connect to my GCP instance using MQTT to send messages.
Here are the steps I have completed so far:
Creating the Instance (from choosing the boot dick to making an SSH Key)
Connecting to said instance using PuTTY (successfully so)
Installing the broker (mosquitto)
Everything that I have done so far has worked properly. My question now is about how to subscribe to a topic.
mosquitto_sub -d -h [host] -u [username] -t [Random topic name]
What is the host? Our external IP, Internal IP or our Service Account?
In the first and second situations, I haven't managed to connect. In the third, I got a "Lookup error"
For the username, I have no idea what it's supposed to be so I haven't used it (maybe this is where my mistake is). It could be the name of the Key I made, the name of the Instance, or something else entirely. I really can't find it anywhere.
If anyone can clarify those problems, it would be great!