sarama (IBM/sarama)
Searching Database…
What is this?
Sarama is a Go client library for Apache Kafka, letting Go applications produce and consume Kafka messages.
Is this a standalone tool or a library I import into my Go code?
It's a library you import into your Go application; it also ships mock packages for testing and some CLI tools for diagnostics.
How do I add it to a project?
Add it as a Go module dependency and check the API docs and examples on pkg.go.dev or the examples directory for usage patterns.
Do I need a specific Kafka or Go version?
You need a reasonably recent Kafka broker and Go toolchain; Sarama follows a '2 releases + 2 months' compatibility window for both.
Will older Kafka versions still work?
They're not officially guaranteed but are likely to still work fine.
Where can I find real usage examples?
The examples directory in the repo contains more elaborate example applications showing how to use Sarama in practice.
Can I write tests for code that uses Sarama without a real Kafka broker?
Yes, Sarama ships a mocks subpackage specifically designed to let you test code against fake Kafka responses.
Where's the deeper technical documentation?
The Sarama wiki covers more technical and design details, and the Kafka Protocol Specification is referenced for protocol-level understanding.
Which topics is it in?
message-queue, kafka, distributed-systems, streaming, testing, backend, networking, go, api, library, cli, developer-tools