Learning MQTT with Golang
 
 
 
Go to file
Drew Bednar 70fcf9c86b Trigger once on pull request and on push to main
.mosquitto Working through bugs
cmd Adding drone pipeline
common Working through bugs
scripts Prepare to use TLS in local dev
.drone.yml Trigger once on pull request and on push to main
.gitignore Prepare to use TLS in local dev
LICENSE Initial commit
Makefile sketching out clients
README.md Adding build badge
docker-compose.yaml Working through bugs
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: