github.com/go-mqtt/mqtt

Package mqtt provides a client for the Message Queuing Telemetry Transport protocol. http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html Publish and Disconnect do fire-and-forget submission. ErrClosed, ErrDown, ErrCanceled or an IsDeny [Publish only] imply no request submission. All other errors imply that the request submission was interrupted by either a connection failure or a PauseTimeout appliance. Ping, Subscribe and Unsubscribe await response from the broker. ErrClosed, ErrDown, ErrMax, ErrCanceled or an IsDeny [Subscribe and Unsubscribe only] imply no request submission. ErrBreak and ErrAbandoned leave with the broker response unknown. Subscribe responses may cause an SubscribeError. All other errors imply that the request submission was interrupted by either a connection failure or a PauseTimeout appliance. PublishAtLeastOnce and PublishExactlyOnce enqueue requests to a Persistence before network submission. Errors imply that the message was dropped: either ErrClosed, ErrMax, Save failure and an IsDeny. Further errors are reported to the respective exchange channel. None of them are fatal, including ErrClosed.


License
CC0-1.0
Install
go get github.com/go-mqtt/mqtt