Awesome Open Source
Awesome Open Source

GOTT Logo

Go Report Card GoDoc License

An MQTT Broker written in pure Go. Aims to be a high-performance, easy-to-use pluggable broker with most of the features that could be embedded in a broker available out of the box (either embedded in the Broker itself or as plugins) at no cost.

Hopefully with your contribution we could build something great!

Project Status

In BETA

  • GOTT is currently in a BETA stage. All planned features fully work as tested while developed. Still, there is room for improvement as more tests and optimizations are needed.

Planned for v1 (MQTT v3.1.1)

  • [x] Ping (client -> server)
  • [x] Topic filtering with wildcards support
  • [x] Subscriptions
  • [x] QoS 0 messages
  • [x] QoS 1 messages
  • [x] QoS 2 messages
  • [x] Retained messages
  • [x] Will messages
  • [x] Sessions
  • [x] Plugins
  • [x] Logging to disk (with levels and log rotation)
  • [x] TLS/SSL
  • [x] WebSockets

Planned for v2

  • [ ] MQTT v5
  • [ ] Clustering

Known Issues

  • Restarting the broker will reset existing subscriptions. They are not saved to disk (sessions are saved to disk but subscriptions are not restored on broker restart).

Quick Start

  1. Install dependencies:
$ go get github.com/google/uuid
$ go get github.com/dgraph-io/badger
$ go get github.com/json-iterator/go
$ go get go.uber.org/zap
$ go get gopkg.in/natefinch/lumberjack.v2
$ go get gopkg.in/yaml.v2
$ go get github.com/gorilla/websocket
  1. Clone/download this repo and place it in $GOPATH/src.
  2. Run cd main inside the project's directory.
  3. Run go run main.go.

Alternatively, you can download and run the install script that will handle dependency installation and repo cloning for you.

Plugins

GOTT implements a plugin system that is very easy to work with. You can easily build your own plugin that does whatever you want.

Start by reading the plugins documentation.

License

Apache License 2.0, see LICENSE.

Contribution

You are very welcome to submit a new feature, fix a bug, an optimization to the code, report a bug or even a benchmark would be helpful.

To Contribute:

Open an issue or:

  1. Fork this repo.
  2. Create a new branch with a descriptive name (example: feature/some-new-function or fix/something-somewhere).
  3. Commit and push your code to your new branch.
  4. Create a new Pull Request here.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Go (196,482
Golang (32,788
Plugin (9,965
Websocket (5,342
Mqtt (2,934
Real Time (2,672
High Performance (616
Broker (266
Realtime Messaging (219
Mqtt Broker (187
Related Projects