travisjeffery
jocko
Go

Kafka implemented in Golang with built-in coordination (No ZK dep, single binary install, Cloud Native)

Last updated Jul 8, 2026
5.0k
Stars
372
Forks
63
Issues
0
Stars/day
Attention Score
88
Language breakdown
Go 99.7%
Makefile 0.2%
Dockerfile 0.1%
Shell 0.1%
β–Έ Files click to expand
README

Jocko

ci gitter codecov

Kafka/distributed commit log service in Go.

Goals of this project:

  • Implement Kafka in Go
  • Protocol compatible with Kafka so Kafka clients and services work with Jocko
  • Make operating simpler
  • Distribute a single binary
  • Use Serf for discovery, Raft for consensus (and remove the need to run ZooKeeper)
  • Smarter configuration settings
- Able to use percentages of disk space for retention policies rather than only bytes and time kept - Handling size configs when you change the number of partitions or add topics
  • Learn a lot and have fun

TODO

  • [x] Producing
  • [x] Fetching
  • [x] Partition consensus and distribution
  • [ ] Protocol
- [x] Produce - [x] Fetch - [x] Metadata - [x] Create Topics - [x] Delete Topics - [ ] Consumer group [current task]
  • [x] Discovery
  • [ ] API versioning [more API versions to implement]
  • [ ] Replication [first draft done - testing heavily now]

Hiatus Writing Book

I’m writing a book for PragProg called Building Distributed Services with Go. You can sign up on this mailing list and get updated when the book’s available. It walks you through building a distributed commit log from scratch. I hope it will help Jocko contributors and people who want to work on distributed services.

Reading

Project Layout

β”œβ”€β”€ broker        broker subsystem
β”œβ”€β”€ cmd           commands
β”‚Β Β  └── jocko     command to run a Jocko broker and manage topics
β”œβ”€β”€ commitlog     low-level commit log implementation
β”œβ”€β”€ examples      examples running/using Jocko
β”‚Β Β  β”œβ”€β”€ cluster   example booting up a 3-broker Jocko cluster
β”‚Β Β  └── sarama    example producing/consuming with Sarama
β”œβ”€β”€ protocol      golang implementation of Kafka's protocol
β”œβ”€β”€ prometheus    wrapper around Prometheus' client lib to handle metrics
β”œβ”€β”€ server        API subsystem
└── testutil      test utils
    └── mock      mocks of the various subsystems

Building

Local

  • Clone Jocko
$ go get github.com/travisjeffery/jocko
  • Build Jocko
$ cd $GOPATH/src/github.com/travisjeffery/jocko
    $ make build

(If you see an error about dep not being found, ensure that $GOPATH/bin is in your PATH)

Docker

docker build -t travisjeffery/jocko:latest .

Contributing

See CONTRIBUTING for details on submitting patches and the contribution workflow.

License

Jocko is under the MIT license, see the LICENSE file for details.


πŸ”— More in this category

Β© 2026 GitRepoTrend Β· travisjeffery/jocko Β· Updated daily from GitHub