gummiboll / go-mqtt-example

Sample app which publish and subscribe to/from a CloudMQTT broker

Home Page:https://www.cloudmqtt.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go MQTT Example

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.

Getting started

  • Make sure you have dep installed
  • Clone this repo git clone https://github.com/CloudMQTT/go-mqtt-example.git
  • export CLOUDMQTT_URL=mqtt://<user>:<pass>@<server>.cloudmqtt.com:<port>/<topic>
  • Run make to download dependencies and run the application

About

Sample app which publish and subscribe to/from a CloudMQTT broker

https://www.cloudmqtt.com


Languages

Language:Go 95.7%Language:Makefile 4.3%