IBM/sarama

Sarama is a Go library for Apache Kafka.

12,519

stars

3,338

commits

Go

primary language

Sep 9, 2026

updated

go
kafka
kafka-client

README

sarama

Go Reference OpenSSF Scorecard OpenSSF Best Practices

Sarama is an MIT-licensed Go client library for Apache Kafka.

Getting started

  • API documentation and examples are available via pkg.go.dev.
  • Mocks for testing are available in the mocks subpackage.
  • The examples directory contains more elaborate example applications.
  • The tools directory contains command line tools that can be useful for testing, diagnostics, and instrumentation.

You might also want to look at the Frequently Asked Questions.

Compatibility and API stability

Sarama provides a "2 releases + 2 months" compatibility guarantee: we support the two latest stable releases of Kafka and Go, and we provide a two month grace period for older releases. However, older releases of Kafka are still likely to work.

Sarama follows semantic versioning and provides API stability via the standard Go module version numbering scheme.

A changelog is available here.

Contributing

Contributors

(top 30 of 273)

eapache

907 commits

dnwe

705 commits

bai

269 commits

dependabot[bot]

215 commits

IBM/sarama

Sarama is a Go library for Apache Kafka.

12,519

stars

3,338

commits

Go

primary language

Sep 9, 2026

updated

go
kafka
kafka-client

README

sarama

Go Reference OpenSSF Scorecard OpenSSF Best Practices

Sarama is an MIT-licensed Go client library for Apache Kafka.

Getting started

  • API documentation and examples are available via pkg.go.dev.
  • Mocks for testing are available in the mocks subpackage.
  • The examples directory contains more elaborate example applications.
  • The tools directory contains command line tools that can be useful for testing, diagnostics, and instrumentation.

You might also want to look at the Frequently Asked Questions.

Compatibility and API stability

Sarama provides a "2 releases + 2 months" compatibility guarantee: we support the two latest stable releases of Kafka and Go, and we provide a two month grace period for older releases. However, older releases of Kafka are still likely to work.

Sarama follows semantic versioning and provides API stability via the standard Go module version numbering scheme.

A changelog is available here.

Contributing

Contributors

(top 30 of 273)

eapache

907 commits

dnwe

705 commits

bai

269 commits

dependabot[bot]

215 commits

Languages

Go

99.9%