This is a simple Go example on how to interact with MQTT.
This example sends a messages every second and the same process receive the message and prints it to the console.
- Make sure you have dep installed
- Clone this repo
git clone https://github.com/NagendraPY/go-mqtt-example.git
- Rplace local hardcode mqtt url with your mqtt topic.
- Run
make
to download dependencies and run the application or simple run commandgo run main.go