Skip to content

Client Libraries

Danube provides official client libraries for four languages. All clients follow the same builder pattern and support the full feature set.

Async client built on Tokio.

Install
cargo add danube-client

Crate · Examples


FeatureRustGoJavaPython
Producers & Consumers✅✅✅✅
Partitioned Topics✅✅✅✅
Reliable Dispatch✅✅✅✅
Exclusive Subscription✅✅✅✅
Shared Subscription✅✅✅✅
Failover Subscription✅✅✅✅
Key-Shared Subscription✅✅✅✅
JSON Schema✅✅✅✅
Avro✅✅✅✅
Protobuf✅✅✅✅
TLS / mTLS✅✅✅✅
JWT Authentication✅✅✅✅

All four clients use the same builder pattern. The API surface is intentionally consistent across languages:

Pattern overview
// Client
let client = DanubeClient::builder()
.service_url("http://127.0.0.1:6650")
.build()
.await?;
// Producer
let mut producer = client.new_producer()
.with_topic("/default/my-topic")
.with_name("my-producer")
.build()?;
// Consumer
let mut consumer = client.new_consumer()
.with_topic("/default/my-topic")
.with_consumer_name("my-consumer")
.with_subscription("my-sub")
.with_subscription_type(SubType::Exclusive)
.build()?;