Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Kafka Client Drivers

Kafka clients are available for all major programming languages. This section provides language-specific guides covering installation, configuration, producer/consumer patterns, and best practices.


Libraryorg.apache.kafka:kafka-clients
Repositorygithub.com/apache/kafka
Documentationkafka.apache.org/documentation
PackageMaven Central
Current Version4.3.x (as of 2026)
MaintainerApache Software Foundation
LicenseApache License 2.0

The Java client is the reference implementation, developed as part of the core Apache Kafka project. First released with Kafka 0.8.0 in 2013, it replaced the older Scala-based client. The Java client is the most feature-complete, supporting Kafka Streams, exactly-once semantics, and all protocol features immediately upon Kafka release.


Librarylibrdkafka
Repositorygithub.com/confluentinc/librdkafka
Documentationdocs.confluent.io/platform/current/clients/librdkafka
Current Version2.12.x (as of 2025)
MaintainerConfluent, originally Magnus Edenhill
LicenseBSD 2-Clause

librdkafka is a high-performance C library created by Magnus Edenhill in 2012, predating the official Java client redesign. Confluent acquired the project in 2016. It serves as the foundation for most non-Java Kafka clients, providing consistent behavior and configuration across Python, Go, .NET, Node.js, Ruby, PHP, and Rust.


Libraryconfluent-kafka
Repositorygithub.com/confluentinc/confluent-kafka-python
Documentationdocs.confluent.io/platform/current/clients/confluent-kafka-python
PackagePyPI
Current Version2.12.x (as of 2025)
MaintainerConfluent
LicenseApache License 2.0
Baselibrdkafka

The official Python client wrapping librdkafka via C extensions. First released in 2016, it provides significantly higher performance than pure-Python alternatives. Supports Schema Registry integration with Avro, Protobuf, and JSON Schema serializers.


Librarykafka-python
Repositorygithub.com/dpkp/kafka-python
Documentationkafka-python.readthedocs.io
PackagePyPI
Current Version2.2.x (as of 2025)
MaintainerDana Powers (dpkp)
LicenseApache License 2.0

A pure Python implementation with no native dependencies. Mirrors the Java client API with Pythonic features like consumer iterators. Supports transactions, all compression types, and consumer groups. With 5.9k GitHub stars and 35,000+ dependent projects, it’s ideal for serverless and environments where native compilation is problematic.


Librarygithub.com/confluentinc/confluent-kafka-go
Repositorygithub.com/confluentinc/confluent-kafka-go
Documentationdocs.confluent.io/platform/current/clients/confluent-kafka-go
Packagepkg.go.dev
Current Versionv2.12.x (as of 2025)
MaintainerConfluent
LicenseApache License 2.0
Baselibrdkafka

The official Go client using cgo bindings to librdkafka. First released in 2017 as v0.9.x, the v2.x series (2023) introduced Go modules support and improved APIs. Requires librdkafka to be installed or uses a pre-built static library.


LibraryConfluent.Kafka
Repositorygithub.com/confluentinc/confluent-kafka-dotnet
Documentationdocs.confluent.io/platform/current/clients/confluent-kafka-dotnet
PackageNuGet
Current Version2.12.x (as of 2025)
MaintainerConfluent
LicenseApache License 2.0
Baselibrdkafka

The official .NET client providing P/Invoke bindings to librdkafka. First released in 2016 as RdKafka, rebranded to Confluent.Kafka in 2017. Supports .NET Standard 2.0+, .NET Framework 4.6.2+, and .NET Core 2.0+.


Librarykafkajs
Repositorygithub.com/tulios/kafkajs
Documentationkafka.js.org
Packagenpm
Current Version2.2.x (as of 2025)
MaintainerTulio Ornelas and community
LicenseMIT
BasePure JavaScript (no native dependencies)

A pure JavaScript implementation requiring no native compilation. Created by Tulio Ornelas in 2018, it gained popularity for its easy installation and modern async/await API. No librdkafka dependency makes it ideal for serverless and containerized environments where native compilation is problematic.


Librarynode-rdkafka
Repositorygithub.com/Blizzard/node-rdkafka
Documentationblizzard.github.io/node-rdkafka
Packagenpm
Current Version3.6.x (as of 2025)
MaintainerBlizzard Entertainment
LicenseMIT
Baselibrdkafka

Native Node.js bindings to librdkafka, developed by Blizzard Entertainment. Offers higher performance than KafkaJS at the cost of native compilation requirements. First released in 2016.


Libraryrdkafka
Repositorygithub.com/fede1024/rust-rdkafka
Documentationdocs.rs/rdkafka
Packagecrates.io
Current Version0.38.x (as of 2025)
MaintainerFederico Giraud and community
LicenseMIT
Baselibrdkafka

Rust bindings to librdkafka with idiomatic Rust API. Created by Federico Giraud in 2016. Supports async/await via Tokio runtime. The library remains at 0.x version indicating ongoing API evolution.


For Go developers who need to avoid cgo dependencies (cross-compilation, Alpine Linux, serverless), two popular pure Go implementations exist:

LibraryRepositoryVersionFeatures
franz-gogithub.com/twmb/franz-gov1.20.xFull EOS, transactions, all SASL
kafka-gogithub.com/segmentio/kafka-gov0.4.xSimple API, Go stdlib style

franz-go is the most feature-complete pure Go client, supporting transactions and exactly-once semantics. Created by Travis Bischel, it’s used in production by Redpanda, Mux, and others.

kafka-go by Segment provides a simpler API modeled after Go’s standard library. It lacks transaction support but is well-suited for straightforward producer/consumer use cases.


LanguageLibraryRepositoryMaintainerBase
Rubyrdkafka-rubygithub.com/appsignal/rdkafka-rubyAppSignallibrdkafka
PHPphp-rdkafkagithub.com/arnaud-lb/php-rdkafkaArnaud Le Blanclibrdkafka
Erlangbrodgithub.com/kafka4beam/brodKlarnaNative
Elixirbroadway_kafkagithub.com/dashbitco/broadway_kafkaDashbitlibrdkafka
Scalafs2-kafkagithub.com/fd4s/fs2-kafkaCommunityJava client

Most non-Java clients are built on librdkafka, a high-performance C library:

Application LayerPythonconfluent-kafkaGoconfluent-kafka-go.NETConfluent.KafkaNode.jsnode-rdkafkaRustrdkafkalibrdkafka(C library)Kafka ClusterCreated 2012 by Magnus EdenhillAcquired by Confluent 2016BSD 2-Clause LicenseKafka Protocol
BenefitDescription
PerformanceHighly optimized C implementation
Feature parityAll clients support same Kafka features
Consistent behaviorSame configuration options across languages
Battle-testedPowers production systems at massive scale

librdkafka-based clients share a common configuration namespace documented at github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md:

# Common librdkafka configuration
bootstrap.servers=kafka:9092
client.id=my-application
acks=all
enable.idempotence=true
compression.type=lz4

ClientMinimum KafkaRecommended Kafka
Java 4.1.x0.10.0+3.0+
librdkafka 2.12.x0.8.0+2.0+
KafkaJS 2.2.x0.10.0+2.0+
FeatureJavalibrdkafkaKafkaJS
Idempotent producer0.11.0+0.11.4+2.0.0+
Transactions0.11.0+0.11.4+2.0.0+
Headers0.11.0+0.11.4+1.4.0+
Cooperative rebalancing2.4.0+1.4.0+Not supported
Static membership2.3.0+1.4.0+2.0.0+

FactorConsideration
Language ecosystemMatch application’s primary language
Performance requirementslibrdkafka-based clients offer highest throughput
Deployment constraintsPure-language clients avoid native dependencies
Feature requirementsCheck client support for transactions, exactly-once
Community supportConsider maintenance activity and documentation
FeatureJavaPythonGoNode.js (KafkaJS).NETRust
Producer
Consumer
Transactions
Idempotence
Admin API
Schema Registry⚠️
SASL/SSL
Kafka Streams

✅ Full support | ⚠️ Partial/community support | ❌ Not available

General throughput characteristics (actual results vary by workload):

ClientRelative ThroughputNotes
Java100%Reference implementation
librdkafka (C)95-105%Sometimes faster than Java
Python (confluent-kafka)90-95%librdkafka overhead minimal
Go (confluent-kafka-go)90-95%cgo overhead minimal
.NET (Confluent.Kafka)85-95%P/Invoke overhead
KafkaJS50-70%Pure JS, no native code

All clients follow a similar producer pattern:

  1. Create configuration
  2. Instantiate producer
  3. Send messages (async with callback or sync)
  4. Handle delivery reports
  5. Flush and close

All clients follow a similar consumer pattern:

  1. Create configuration with group.id
  2. Instantiate consumer
  3. Subscribe to topics
  4. Poll for messages in loop
  5. Process messages
  6. Commit offsets
  7. Close on shutdown

security.protocol=SASL_SSL
sasl.mechanism=PLAIN
sasl.username=user
sasl.password=password
security.protocol=SASL_SSL
sasl.mechanism=SCRAM-SHA-256
sasl.username=user
sasl.password=password
security.protocol=SSL
ssl.ca.location=/path/to/ca.crt
ssl.certificate.location=/path/to/client.crt
ssl.key.location=/path/to/client.key

  • Java - Native Apache Kafka client
  • Python - confluent-kafka-python with librdkafka
  • Go - confluent-kafka-go with librdkafka
  • Node.js - KafkaJS (pure JS) and node-rdkafka
  • .NET - confluent-kafka-dotnet with librdkafka
  • Rust - rdkafka with librdkafka