- How to evaluate Kafka client libraries
- Recommended libraries by programming language
- Key considerations: librdkafka, Schema Registry support, security
How to choose a Kafka client library
| Consideration | What to check |
|---|---|
| Implementation type | Pure vs librdkafka wrapper (affects deployment) |
| Security | SSL, SASL (PLAIN, SCRAM, GSSAPI, OAUTHBEARER, MSK IAM) |
| Schema Registry | Confluent Schema Registry support (Avro, JSON, Protobuf) |
| Performance | Benchmark with realistic workloads |
Kafka client libraries SDK list
Here you can find a list of libraries that has been compiled to ensure you have some pointers on when to start with your implementation:-
Java
- The official client library: low-level client
- The official Kafka Streams client library: to create your Kafka Streams application
- Kafka for Spring Boot: applies Spring concepts to Kafka development
- Spring Cloud Stream: bindings for Kafka Stream
- Akka Streams & Alpakka Kafka
-
Scala
- FS2 Kafka: Functional Kafka Producer and Consumer
- ZIO Kafka: Kafka Client for ZIO
- Kafka Streams Scala: the official kafka-streams library has Scala since Kafka 2.0
- Alpakka Kafka
-
C/C++
- librdkafka: low-level implementation of the Kafka client, many other higher level language libraries are a wrapper around this library. Supports all kind of security, and most KIPs
- CPP Kafka: based on librdkafka
- Modern CPP Kafka: based on librdkafka
-
Golang
- Confluent Kafka Go: wrapper of librdkafka, currently no Schema Registry support
- Schema Registry Client for Go: compatible with Confluent Kafka Go
- Segment’s Kafka Go: pure Go implementation of the Kafka Client, good support
- Franz Go: Pure go implementation, supports most KIPs
- others if you’re curious: Sarama, Goka
-
Python
- Confluent Kafka Python: based on librdkafka, includes an Admin client, Avro support with the Confluent Schema Registry
- Kafka Python: not active, use at your own risk
-
Javascript / Node.js
- KafkaJS: no external dependencies, good performance, support for Schema Registry
- Blizzard Node rdkafka: Node.js wrapper for librdkafka, low maintenance activity
-
.NET / C#
- Confluent Kafka DotNet: wrapper around librdkafka, full Schema Registry support (Avro, JSON, Protobuf)
-
Rust
- Rust rdkafka: Rust wrapper for librdkafka, good performance
- Rust Schema Registry Converter: compatible with Rust rdkafka
- Kafka Rust: pure Rust implementation, low maintenance activity
-
REST API
- Confluent REST Proxy: REST API for Kafka. Deploy with a reverse proxy sidecar to implement the security mechanism you need. Historically needed, but now that client library support for Kafka is quite good, you migh not have a use case for it.
-
Kotlin
- simply use the standard Java library
-
Haskell
- HW Kafka Client: based on librdkafka
- HW Kafka Avro: support for Schema Registry
-
Ruby
- rdkafka-ruby: based on librdkafka
- Ruby Kafka: limited support for new API
See it in practice with ConduktorConduktor Console works with applications built in any language. Use it to inspect messages, monitor consumer groups, and debug your Kafka applications regardless of which SDK you choose.
Next steps
- Set up a Java project with Kafka dependencies
- Build a producer in Java
- Build a consumer in Java