Registry / messaging / confluentinc-confluent-kafka-go

confluentinc-confluent-kafka-go

JSON →
library1.9.2gogounverified

A Go client for Apache Kafka, based on the Confluent Kafka client library (librdkafka).

go get github.com/confluentinc/confluent-kafka-go
INSTALL
IMPORT
SIG · CONFLUENTINC-CONFL
C
confluentinc-confluent-kafka-go
messaginggov1.9.2
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.

kafka
github.com/confluentinc/confluent-kafka-go/kafka

Creates a Kafka producer and sends a message.

package main import ( "github.com/confluentinc/confluent-kafka-go/kafka" ) func main() { p, err := kafka.NewProducer(&kafka.ConfigMap{"bootstrap.servers": "localhost"}) if err != nil { panic(err) } p.Produce(&kafka.Message{TopicPartition: kafka.TopicPartition{Topic: &topic, Partition: kafka.PartitionAny}, Value: []byte("hello")}, nil) }
Debug
Known issues
gotchaRequires librdkafka to be installed on the system.
fix
Install librdkafka via your package manager or use a Docker image with it pre-installed.
affects: >=0.0.0
Upgrade
Version history
1.9.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
31 hits · last 30 days
node
30
OpenAI (training)
1
Resources
confluentinc-confluent-kafka-go — go get confluentinc-confluent-kafka-go · libregistry