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!
- 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.
- Ping (client -> server)
- Topic filtering with wildcards support
- Subscriptions
- QoS 0 messages
- QoS 1 messages
- QoS 2 messages
- Retained messages
- Will messages
- Sessions
- Plugins
- Logging to disk (with levels and log rotation)
- TLS/SSL
- WebSockets
- MQTT v5
- Clustering
- 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).
- 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
- Clone/download this repo and place it in $GOPATH/src.
- Run
cd main
inside the project's directory. - Run
go run main.go
.
Alternatively, you can download and run the install script that will handle dependency installation and repo cloning for you.
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.
Apache License 2.0, see LICENSE.
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.
Open an issue or:
- Fork this repo.
- Create a new branch with a descriptive name (example: feature/some-new-function or fix/something-somewhere).
- Commit and push your code to your new branch.
- Create a new Pull Request here.