// the find
confluentinc/confluent-kafka-go
Confluent's Apache Kafka Golang client
Confluent's official Go client for Apache Kafka — a CGO wrapper around librdkafka, the same C library backing their Python and .NET clients. It's for teams running production Kafka workloads in Go who want feature parity with the JVM client and don't mind a CGO dependency.
Ships prebuilt librdkafka binaries for the major platform/libc combos (glibc, musl, macOS, Windows) so you don't need to build librdkafka yourself in the common case. Schema Registry integration covers Avro, Protobuf, and JSON Schema with real serializers, not just bindings. Function-based Produce()/Poll() API maps closely to librdkafka semantics, and consumer group rebalancing, transactions, and KIP-848 support are all present and exercised by a real integration test suite against dockerized brokers.
Being a CGO wrapper means CGO_ENABLED can't be 0, cross-compilation is more painful than a pure-Go client, and true static linking on glibc systems is unreliable (getaddrinfo still needs the shared libc) — you end up needing musl builds or matching build/target glibc versions. GSSAPI/Kerberos support isn't in the bundled binaries, so anyone needing it has to build librdkafka from source and switch to -tags dynamic. The repo still carries a legacy channel-based API alongside the recommended function-based one, which is dead weight for newcomers skimming examples. Produce() is non-blocking with a bounded internal queue, so backpressure handling (retry-on-full-queue) is left entirely to the caller.