Franz-go is a pure Go client library for Apache Kafka that supports all Kafka versions from 0.8.0 through 4.4 and later.
The library addresses the need for a complete, idiomatic Kafka client in Go by implementing every major Kafka feature directly in the language rather than wrapping C libraries or other bindings. It supports producing and consuming with exactly-once semantics, transactional operations, multiple consumer group balancing strategies including cooperative and rack-aware assignment, all compression types, SSL/TLS, and every SASL authentication mechanism. The tool also provides high-level admin functionality through a dedicated package and includes a schema registry client with serialization support. Its design emphasizes performance by avoiding unnecessary channels and goroutines while maintaining an intuitive API that respects Kafka's expectations around timeouts and protocol behavior.
Developers should choose this library if they need comprehensive Kafka support in Go without external dependencies. It suits projects ranging from simple producers and consumers to complex deployments requiring transactions, administrative operations, or integration with Kafka-compatible brokers like Redpanda, Confluent Platform, Microsoft Event Hubs, or Amazon MSK. The library is organized into separate packages and modules allowing independent feature development: the main client lives in the kgo package, administrative tools in kadm, and plugins for metrics and logging in dedicated submodules.
The project maintains active development with regular updates addressing new Kafka protocol features and KIPs. Contributions are accepted and reviewed, with the codebase demonstrating attention to both API design and performance optimization. The maintainers provide comprehensive documentation including examples, API references, and supplementary guides in the docs directory.