kafkit-client
Full-fledged Kafka client in native Rust.
What It Is
- Async Kafka client built with Rust, Tokio, and
kafka-protocol. - Application-facing facade for producer, consumer, share-group consumer, and admin APIs.
- Kafka 4.0+ focused.
- Designed for direct use in services, tools, tests, and operational workflows.
Features
- Async producer.
- Async consumer.
- Kafka share-group consumer.
- Admin client.
- Topic-scoped
KafkaClientbuilder. - Record headers.
- Nullable values and tombstones.
- Explicit record timestamps.
- Configurable compression.
- Flush and shutdown controls.
- Delivery timeout handling.
- Manual assignment.
- Subscribe by topic list.
- Subscribe by topic pattern.
- Seek, position, pause, and resume.
- Beginning, end, committed, and timestamp offset lookup.
- Transactional producer support.
send_offsets_to_transaction.- Transaction protocol v2 support.
- TLS.
- SASL/PLAIN.
- SASL/SCRAM-SHA-256.
- SASL/SCRAM-SHA-512.
- Broker metadata lookup.
- Topic create, list, describe, delete, and config APIs.
- Consumer group listing and description.
- Broker and cluster description.
- Tracing instrumentation.
Quick Start
use ;
# async
Producer
use ;
# async
Consumer
use ;
# async
Admin
use ;
# async
Security
- TLS with custom CA support.
- TLS server-name override.
- TLS client certificates.
- SASL/PLAIN.
- SASL/SCRAM-SHA-256.
- SASL/SCRAM-SHA-512.
Compatibility
- Apache Kafka 4.0+.
- Modern consumer groups.
- Transaction protocol v2.
- Older brokers are intentionally unsupported.
Crate Surface
KafkaClientfor ergonomic application setup.KafkaProducerfor lower-level producer control.KafkaConsumerfor lower-level consumer control.KafkaShareConsumerfor share-group consumption.KafkaAdminfor administrative operations.ProducerConfig,ConsumerConfig, andAdminConfigfor direct configuration.