Rust SDK: roxa-client
roxa-client is the official Rust library on top of the gRPC data plane: topic administration, produce/fetch, offsets, consumer groups, the idempotent producer.
Other languages
There are no separate SDKs for Go/Java/Python, and none are needed for messaging — use existing Kafka clients. The Rust SDK is for when you want the native gRPC path (fewer layers) or administrative operations from code.
Connecting
rust
use client::Client;
// without authentication:
let mut client = Client::connect("http://127.0.0.1:50051").await?;
// with data-plane authentication:
let mut client = Client::connect_with_auth("http://broker:50051", "app", "secret").await?;
// TLS/mTLS:
let mut client = Client::connect_with_tls(endpoint, ca_pem, client_identity, domain, credentials).await?;Produce → Fetch
rust
use client::{Client, Durability, RecordInput};
let mut client = Client::connect("http://127.0.0.1:50051").await?;
client.create_topic("demo", 1, Durability::Default, None, None).await?;
let out = client
.produce("demo", Some(0), None, vec![
RecordInput::value(b"hello".to_vec()),
RecordInput::value(b"world".to_vec()),
])
.await?; // the ack comes after a durable write; out.base_offset == 0
let fetched = client.fetch("demo", 0, 0, 100).await?; // partition 0, from offset 0, max 100
for rec in fetched.records {
println!("{}: {:?}", rec.offset, rec.value);
}What else it can do
| Facet | Methods |
|---|---|
| admin | create_topic, list_topics, describe_topic, delete_topic, diagnostics, get_cluster_state, list_consumer_groups |
| producer | produce, init_producer_id, produce_idempotent |
| consumer | fetch, commit_offset, fetch_committed_offset, join_group, heartbeat, leave_group, get_assignment |
The idempotent producer: init_producer_id() → produce_idempotent(...) — retrying the same batch does not create duplicates within a session.