Runnable examples for the public kacrab API. Not published.
producer- publicProducerusage, batching, idempotence, transactions, and auth configuration examples.admin- publicAdminClientusage: describe cluster, create/list/describe topics, describe/incremental-alter configs, add partitions, list offsets, list consumer groups, and delete topics.config- Kafka config facade and typed config conversion examples.typed_serializer- a customProducerSerializer<T>wired throughbuild_with_serializersto send a strongly-typed value.
Run examples from the workspace root (the producer/admin examples need a
local broker, e.g. docker compose -f docker-compose.kafka.yml up -d):
cargo run -p kacrab-examples --example producer
cargo run -p kacrab-examples --example admin
cargo run -p kacrab-examples --example config
cargo run -p kacrab-examples --example typed_serializerThe admin example takes optional positional args bootstrap topic partitions:
cargo run -p kacrab-examples --example admin -- 127.0.0.1:9092 my-topic 3kacrab-examples is authored and maintained by pirumu.
This crate is licensed under either MIT or Apache-2.0, matching the workspace.