MCPcopy Index your code
hub / github.com/danube-messaging/danube

github.com/danube-messaging/danube @v0.15.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.15.0 ↗ · + Follow
3,060 symbols 10,906 edges 336 files 899 documented · 29% updated 1d agov0.15.0 · 2026-06-15★ 1652 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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

Extension points exported contracts — how you extend this code

PayloadValidator (Interface)
Trait for validating message payloads against schema definitions This validates the actual message content, not the sche [6 …
danube-schema/src/validator.rs
MetadataStore (Interface)
(no doc) [3 implementers]
danube-core/src/metadata/store.rs
ResourceMonitor (Interface)
(no doc) [2 implementers]
danube-broker/src/danube_service/resource_monitor.rs
DurableChunkReader (Interface)
(no doc) [1 implementers]
danube-persistent-storage/src/durable_store.rs
PersistentStorage (Interface)
(no doc) [1 implementers]
danube-core/src/storage.rs
DurableStore (Interface)
(no doc) [1 implementers]
danube-persistent-storage/src/durable_store.rs
ProducerService (Interface)
(no doc) [1 implementers]
danube-core/src/proto/danube.rs
ConsumerService (Interface)
(no doc) [1 implementers]
danube-core/src/proto/danube.rs

Core symbols most depended-on inside this repo

clone
called by 544
danube-broker/src/metadata_storage.rs
clone
called by 515
danube-edge/src/readiness.rs
build
called by 184
danube-client/src/client.rs
insert
called by 173
danube-broker/src/topic_control.rs
is_empty
called by 160
danube-broker/src/dispatcher/shared.rs
with_topic
called by 158
danube-client/src/producer.rs
len
called by 143
danube-broker/src/dispatcher/shared.rs
send
called by 141
danube-client/src/producer.rs

Shape

Method 1,403
Function 938
Class 612
Enum 89
Interface 18

Languages

Rust100%
Python1%

Modules by API surface

danube-core/src/proto/danube_admin.rs169 symbols
danube-core/src/proto/danube.rs69 symbols
danube-admin/src/mcp/server.rs65 symbols
danube-core/src/proto/danube_schema.rs60 symbols
danube-admin/src/core/grpc_client.rs50 symbols
danube-broker/src/topic.rs39 symbols
danube-core/src/proto/danube.edge.rs34 symbols
danube-broker/src/resources/topic.rs33 symbols
danube-broker/src/dispatcher/dispatch_window.rs33 symbols
danube-broker/src/topic_control.rs32 symbols
danube-core/src/proto/danube.raft.rs31 symbols
danube-broker/src/broker_service.rs31 symbols

For agents

$ claude mcp add danube \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page