Registry / messaging / ibm-sarama

ibm-sarama

JSON →
library1.49.0gogounverified

A pure Go client library for Apache Kafka, supporting producing and consuming messages with both high-level and low-level APIs.

go get github.com/IBM/sarama
INSTALL
IMPORT
SIG · IBM-SARAMA
I
ibm-sarama
messaginggov1.49.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sarama
github.com/IBM/sarama

List partitions for a Kafka topic using a consumer.

package main import ( "fmt" "github.com/IBM/sarama" ) func main() { consumer, err := sarama.NewConsumer([]string{"localhost:9092"}, nil) if err != nil { panic(err) } partitions, _ := consumer.Partitions("my_topic") fmt.Println(partitions) }
Debug
Known issues
gotchaThe SyncProducer's durability guarantees depend on Producer.RequiredAcks; messages can be lost with certain configurations.
fix
Set Producer.RequiredAcks to sarama.WaitForAll for maximum durability.
affects: >=1.0.0
Upgrade
Version history
1.49.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
ibm-sarama — go get ibm-sarama · libregistry