# segmentio/kafka-go

Kafka library in Go

Repository: https://github.com/segmentio/kafka-go
Canonical: https://ross.abutalabs.com/products/kafka-go
Language: Go
License: MIT
License Family: permissive
Topics: kafka, golang, go, segment, kafka-client, consumer, producer, golang-library, golang-native
Last push: 2026-04-23T20:36:07+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 78, release rhythm 56, longevity 100
- inputs: {"age_days": 3403, "days_push": 132, "days_rel": 132, "gap_med": 99, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8613, forks 858 (observed 2026-08-28T04:10:23.821075+00:00)

## What it is
kafka-go is a pure-Go Apache Kafka client library offering both low-level connection APIs and high-level Reader/Writer abstractions for producing and consuming messages. It mirrors Go standard library idioms like context support without cgo dependencies.

## Use cases
- produce and consume kafka messages in go
- pure go kafka client without cgo
- read from a kafka topic with consumer groups
- write events to kafka from a go service
- build event-driven microservices with kafka
- stream processing pipelines in go

## When to choose
- you want a well-documented, idiomatic Go Kafka client with context support
- you need to avoid cgo dependencies like librdkafka
- you want both low-level protocol access and high-level reader/writer APIs

## When to avoid
- you need the newest Kafka protocol features immediately, as support may lag
- you require maximum throughput at extreme scale where librdkafka-based clients may outperform
- you need a client for a specific usage pattern like Kafka-as-a-message-bus (goka)

## Facets
- artifact type: library
- maturity: active
- function: message-queue, http-client, streaming
- domain: microservices, backend, developer-tools
- platform: go, cross-platform
- tags: kafka, kafka-client, producer, consumer, golang-library, event-streaming, messaging

## Member repositories
- segmentio/kafka-go (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:23.821075+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:25:53.437228+00:00, confidence not recorded.
  - readme: https://github.com/segmentio/kafka-go (fetched 2026-08-28T04:10:23.821075+00:00, sha 7620d59f7da8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
