Learning MQTT with Golang
 
 
 
Drew Bednar d2763ed9d0 Add dronio for unit test and linting ()
Resolves 

Co-authored-by: Drew Bednar <drew@androiddrew.com>
Reviewed-on: 
.mosquitto Add dronio for unit test and linting ()
cmd Add dronio for unit test and linting ()
common Add dronio for unit test and linting ()
scripts Prepare to use TLS in local dev
.drone.yml Add dronio for unit test and linting ()
.gitignore Prepare to use TLS in local dev
LICENSE Initial commit
Makefile Add dronio for unit test and linting ()
README.md Add dronio for unit test and linting ()
docker-compose.yaml Add dronio for unit test and linting ()
go.mod Added local-dev broker and golang lib
go.sum Added local-dev broker and golang lib
main.go Hello MQTT
main_test.go Hello MQTT

README.md

Learn MQTT with Go

build-status

Learning MQTT with Golang by doing. This repo is a simple example of using a Golang application as a client (pub & sub) of an MQTT broker.

1883, Eclipse Mosquitto unsecured (opening the port on the internet is not recommended).

Development

For local development we use Mosquitto as our MQTT broker, with TLS enabled.

First generate local development certs using:

make gen-local-tls-certs

This will create CA, server, and client certificates suitable for local development. Server and CA certs are created in ./.mosquitto/certs. The client cert is create in the project root.

Start the local development environment with:

make start-dev

Stop the local development environment with:

make stop-dev

Usage

Instructions TBD

Resources: