Danube Logo

Reliable pub/sub and streaming platform built in Rust. One binary.

Documentation Docker Rust License

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-messaging.com

Try It in minutes

Download the latest binary from the releases page or pull the container image:

# Binary
danube-broker --mode standalone --data-dir ./danube-data

# Or Docker
docker run -p 6650:6650 -p 50051:50051 \
  ghcr.io/danube-messaging/danube-broker:latest \
  --mode standalone --data-dir /data \
  --broker-addr 0.0.0.0:6650 --admin-addr 0.0.0.0:50051

That'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_sub

Or use any of the client libraries (Rust, Go, Java, Python).

Three Deployment Modes

Danube runs as a single binary in three modes. Choose the one that fits your use case:

๐Ÿ–ฅ๏ธ Standalone

A single self-contained broker. Zero config, zero dependencies. Ideal for development, CI, and single-server deployments.

danube-broker --mode standalone --data-dir ./danube-data

๐ŸŒ Cluster

Multiple 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.

๐Ÿญ Edge

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.yaml
MQTT 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.

๐Ÿ“– Broker Modes documentation

Key Features

๐Ÿ“จ 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

๐Ÿ”Œ Danube Connect : Out-of-process connector ecosystem for databases, analytics, and IoT (MQTT, Delta Lake, Qdrant, SurrealDB, and more)

๐Ÿค– AI Admin : MCP integration for managing your cluster with natural language via Claude, Cursor, or Windsurf

๐Ÿ“– Learn more : Topics ยท Subscriptions ยท Persistence ยท Security ยท Architecture

Client Libraries

Tools

Project Structure

Contributing

Danube is actively developed with new features added regularly. See the contribution guide for how to set up a local development environment, run tests, and submit pull requests.

๐Ÿ› Report Issues ยท ๐Ÿ’ก Request Features ยท ๐Ÿ“– Development Guide