This repository contains the source code for the Eclipse Paho MQTT V5 Go client library.
There is also a v3 client available (note that this is an older project and it's API varies considerably).
This client is designed to work with the standard Go tools, so installation is as easy as:
go get github.com/eclipse/paho.golang
The main library is in the paho
folder (so for general usage import "github.com/eclipse/paho.golang/paho"
). There are
examples off this folder in paho/cmd
and extensions in paho/extensions
.
autopaho
(import "github.com/eclipse/paho.golang/autopaho"
) is a fairly simple wrapper that automates the connection
process (mqtt
and mqtts
) and will automatically reconnect should the connection drop. For many users this package
will provide a simple way to connect and publish/subscribe as well as demonstrating how to use the paho.golang/paho
.
autopaho/examples/docker
provides a full example using docker to run a publisher and subscriber (connecting to
mosquitto).
Please report bugs by raising issues for this project in github https://github.com/eclipse/paho.golang/issues
Discussion of the Paho clients takes place on the Eclipse paho-dev mailing list.
General questions about the MQTT protocol are discussed in the MQTT Google Group.
There is much more information available via the MQTT community site.