// the find
IBM/sarama
Sarama is a Go library for Apache Kafka.
Sarama is the most widely-used pure-Go Kafka client, covering the full Kafka protocol surface: producers, consumers, consumer groups, transactions, ACLs, admin operations. It's what you reach for when you need Kafka in Go and don't want to wrap librdkafka. Maintained by IBM after Shopify handed it off.
Pure Go — no CGo, no librdkafka dependency, which makes cross-compilation and static binaries straightforward. Protocol coverage is unusually complete: transactions, exactly-once semantics, SCRAM auth, Kerberos, ACLs, partition reassignment — most Go Kafka clients stop well short of this. The mocks subpackage is genuinely useful for unit testing producers and consumers without a real broker. Functional test suite runs against actual Kafka via Docker, so regressions in wire compatibility get caught rather than papered over.
The API predates modern Go idioms — config is a giant struct with ~80 fields, consumer group rebalance logic is callback-heavy, and error handling is inconsistent between sync and async producers. franz-go has largely overtaken it on performance and API ergonomics; if you're starting fresh today, Sarama is not obviously the right pick. The 'global logger' pattern (sarama.Logger = ...) is a global side effect in 2026, which is annoying in any multi-tenant or testing context. Documentation covers the happy path but leaves you reading source when anything goes wrong — the FAQ exists but is thin.