A lightweight, cloud-native messaging platform built in Rust
Danube is an open-source messaging platform built in Rust for teams that need reliable pub/sub and streaming without the operational overhead. Built on Tokio and openraft, metadata is replicated through embedded Raft consensus, so there are no external dependencies to deploy or manage. Run it as a single-node standalone broker, scale to a multi-node cluster, or deploy at the edge to ingest MQTT device data into the cloud, all from the same binary.
📖 Full documentation at danube-docs.dev-state.com
Download the latest danube-broker binary from the releases page and start a broker:
danube-broker --mode standalone --data-dir ./danube-dataThat's it. Broker on 127.0.0.1:6650, admin on 127.0.0.1:50051, no config file needed.
Test with the CLI:
# Terminal 1: produce
danube-cli produce -s http://127.0.0.1:6650 -t /default/demo -c 10 -m "Hello, Danube!"
# Terminal 2: consume
danube-cli consume -s http://127.0.0.1:6650 -t /default/demo -m my_subOr use any of the client libraries (Rust, Go, Java, Python).
Danube runs as a single binary in three modes. Choose the one that fits your use case:
A single self-contained broker. Zero config, zero dependencies. Ideal for development, CI, and single-server deployments.
danube-broker --mode standalone --data-dir ./danube-dataMultiple brokers forming a Raft consensus group with automated topic distribution, leader election, and load-based rebalancing. The recommended mode for production.
danube-broker --config-file danube_broker.yml \
--broker-addr 0.0.0.0:6650 --raft-addr 0.0.0.0:7650 \
--data-dir ./data/raft --seed-nodes "node1:7650,node2:7650,node3:7650"Deploy with Docker Compose or Kubernetes + Helm.
A lightweight MQTT gateway that ingests data from IoT devices at the edge and replicates it to the central cluster. Devices publish via standard MQTT; the edge broker validates payloads against schemas, buffers into a local WAL, and continuously replicates to the cloud.
danube-broker --mode edge --data-dir ./edge-data --edge-config edge.yamlMQTT devices ──► Edge broker ──► Local WAL ──► Cluster
(MQTT v3.1/v5) (survives (gRPC
outages) replication)
Edge mode is designed for factory floors, remote sites, and any environment where constrained devices speak MQTT and need resilient data delivery to a central platform.
📨 Messaging : Topics (partitioned / non-partitioned), reliable (at-least-once) and non-reliable dispatch, dead-letter queues
🔄 Subscriptions : Exclusive, Shared, Failover, and Key-Shared (per-key ordering via consistent hashing)
💾 Storage : Local WAL, shared filesystem, or S3/GCS/Azure object store with tiered replay
📋 Schema Registry : JSON Schema, Avro, Protobuf with versioning and compatibility enforcement
🔒 Security : TLS/mTLS, JWT, API-key auth, RBAC with default-deny
🏗️ Cluster : Embedded Raft consensus, automated rebalancing, zero-downtime scaling
🏭 Edge : MQTT v3.1.1/v5.0 ingestion, schema validation at the edge, WAL-buffered replication
🤖 AI Admin : MCP integration : manage your cluster with natural language via Claude, Cursor, Windsurf
📖 Learn more : Topics · Subscriptions · Persistence · Security · Architecture
- Rust : danube-client · examples
- Go : danube-go · examples
- Java : danube-java · examples
- Python : danube-client · examples
Contributions for other languages (Node.js, C#, Ruby) are welcome!
- danube-cli : Command-line producer and consumer
- danube-admin : Cluster administration (CLI, AI/MCP, Web UI)
- danube-broker : Core messaging broker
- danube-edge : Edge MQTT gateway and replicator
- danube-schema : Schema registry (JSON Schema, Avro, Protobuf)
- danube-raft : Embedded Raft consensus
- danube-persistent-storage : WAL and durable storage engine
- danube-client : Async Rust client library
- danube-cli : Command-line producer/consumer
- danube-admin : Unified admin tool
Get involved : Danube is actively developed with new features added regularly.