Skip to content

Broker Configuration

This page documents every configuration option in danube_broker.yml. For a ready-to-use secure configuration, see config/danube_broker_secure.yml in the repository.


danube_broker.yml
cluster_name: "MY_CLUSTER"
FieldTypeDefaultDescription
cluster_nameString(required)Identifies the cluster in metrics, logs, and multi-cluster setups. Use a descriptive name like production-us-east.

danube_broker.yml
broker:
host: "0.0.0.0"
ports:
client: 6650
admin: 50051
raft: 7650
prometheus: 9040
# advertised_listeners:
# broker_url: "broker-0.danube-broker-headless:6650"
# connect_url: "danube-proxy.example.com:6650"
FieldDefaultDescription
broker.host0.0.0.0Network interface to bind to. Use 127.0.0.1 for local-only.
broker.ports.client6650Producer and consumer gRPC connections
broker.ports.admin50051Admin API (gRPC) for danube-admin
broker.ports.raft7650Raft inter-node gRPC transport
broker.ports.prometheus9040Prometheus metrics scrape endpoint. Set to null to disable.

Optional. Required when the broker’s bind address differs from the address clients or peers should connect to (Kubernetes, proxies, NAT).

FieldDefaultDescription
broker.advertised_listeners.broker_urlhost:client_portAddress reachable inside the cluster (inter-broker, Raft identity)
broker.advertised_listeners.connect_urlSame as broker_urlAddress reachable by external clients (via load balancer or ingress)

Danube embeds Raft consensus directly. No external dependency (no etcd, no ZooKeeper). The node_id is auto-generated on first boot and persisted in {data_dir}/node_id.

danube_broker.yml
meta_store:
data_dir: "./danube-data/raft"
# seed_nodes:
# - "broker1:7650"
# - "broker2:7651"
# - "broker3:7652"
FieldTypeDefaultDescription
meta_store.data_dirPath./danube-data/raftDirectory for Raft log, snapshots, and node identity. Use durable storage. Each broker must have its own directory.
meta_store.seed_nodesString[](empty)Raft transport addresses for initial cluster formation.

Cluster formation rules:

  • Single-node: omit seed_nodes entirely. The broker auto-initializes a single-node Raft cluster.
  • Multi-node: list ALL initial peers, including this broker’s own host:raft_port.

danube_broker.yml
bootstrap_namespaces:
- "default"
auto_create_topics: true
# admin_tls: false
FieldTypeDefaultDescription
bootstrap_namespacesString[]["default"]Namespaces created automatically on broker startup
auto_create_topicsBooleantrueAllow producers to create topics automatically. Set to false in production for controlled topic creation via admin API.
admin_tlsBooleanfalseEnable TLS on the admin gRPC API. When true, reuses auth.tls certificates.

Controls TLS encryption, JWT authentication, and RBAC authorization. For a complete walkthrough, see Securing a Cluster.

danube_broker.yml (development)
auth:
mode: none
danube_broker_secure.yml (production)
auth:
mode: tls
tls:
cert_file: "./cert/server-cert.pem"
key_file: "./cert/server-key.pem"
ca_file: "./cert/ca-cert.pem"
jwt:
secret_key: "your-secret-key"
issuer: "danube-auth"
expiration_time: 3600
super_admins:
- "admin"
ModeEncryptionAuthenticationAuthorizationUse Case
noneOffOffOffLocal development and testing
tlsTLS everywhereJWT tokensRBAC (default-deny)Production

When mode: tls is set:

  • Client connections use server TLS
  • Inter-broker replication uses mutual TLS (mTLS)
  • Raft consensus uses mutual TLS (mTLS)
  • All requests require a valid JWT token
  • Every operation is checked against RBAC policies

Required when auth.mode: tls. A single certificate set is shared across all broker services.

FieldTypeDescription
auth.tls.cert_filePathServer certificate presented to clients and peers
auth.tls.key_filePathServer private key
auth.tls.ca_filePathCertificate authority for verifying peers (mTLS) and client certificates

Required when auth.mode: tls. JWT tokens authenticate clients and administrators.

FieldTypeDefaultDescription
auth.jwt.secret_keyString(required)HMAC-SHA256 shared secret for signing and validating tokens. Must match the --secret-key used with danube-admin security tokens create.
auth.jwt.issuerStringdanube-authExpected iss claim. Tokens with a different issuer are rejected.
auth.jwt.expiration_timeInteger (seconds)3600Default token validity duration
FieldTypeDefaultDescription
auth.super_adminsString[][]JWT subjects that bypass RBAC entirely. Use for initial bootstrap and break-glass access. Remove once RBAC policies are in place.

Controls topic assignment to brokers and automated rebalancing. For architecture details, see Load Manager Architecture.

danube_broker.yml
load_manager:
assignment_strategy: "fair"
load_report_interval_seconds: 30
rebalancing:
enabled: false
aggressiveness: "balanced"
check_interval_seconds: 300
max_moves_per_hour: 10
cooldown_seconds: 60
min_brokers_for_rebalance: 2
min_topic_age_seconds: 300
blacklist_topics: []

Controls how new topics are placed on brokers.

StrategyAlgorithmBest For
fairTopic count onlyDevelopment, testing
balanced(topic_load × 0.3) + (CPU × 0.35) + (Memory × 0.35)Production (recommended)
weighted_loadAdaptive bottleneck detectionHighly variable workloads
FieldTypeDefaultDescription
assignment_strategyStringfairTopic placement algorithm
load_report_interval_secondsInteger30How often brokers publish load metrics. Lower = faster response, higher metadata traffic.

Automatically moves topics between brokers to maintain cluster balance.

FieldTypeDefaultDescription
rebalancing.enabledBooleanfalseEnable automated rebalancing. Start disabled, enable after cluster is stable.
rebalancing.aggressivenessStringbalancedPreset: conservative, balanced, or aggressive
rebalancing.check_interval_secondsIntegerVariesHow often to evaluate balance
rebalancing.max_moves_per_hourIntegerVariesRate limit for topic moves
rebalancing.cooldown_secondsIntegerVariesMinimum wait between consecutive moves
rebalancing.min_brokers_for_rebalanceInteger2Rebalancing skipped with fewer brokers
rebalancing.min_topic_age_secondsInteger300Topics younger than this are never moved
rebalancing.blacklist_topicsString[][]Glob patterns for topics to never rebalance

Aggressiveness presets:

LevelCV ThresholdCheck IntervalMax Moves/HourCooldown
conservative> 40%600s5120s
balanced> 30%300s1060s
aggressive> 20%180s2030s

Controls how reliable topics persist messages. Non-reliable topics bypass storage entirely.

danube_broker.yml (local mode)
storage:
mode: local
local_wal_root: "./danube-data/wal"
metadata_prefix: "/danube"
local_retention:
time_minutes: 2880
size_mb: 20480
check_interval_minutes: 5
wal:
rotation:
max_bytes: 536870912
ModeDurable HistoryUse Case
localLocal filesystemSingle-node, development
shared_fsShared filesystem (NFS, EFS)On-prem multi-broker
object_storeRemote via OpenDAL (S3, GCS, Azure Blob)Cloud-native multi-broker
FieldTypeDefaultDescription
storage.modeString(required)local, shared_fs, or object_store
storage.local_wal_rootPath./danube-data/walRoot directory for per-topic WAL files. Use fast SSD/NVMe. In shared_fs/object_store modes, auto-derived from meta_store.data_dir if omitted.
storage.metadata_prefixString/danubePrefix for storage metadata keys in Raft. Change only when multiple independent clusters share the same Raft group.

Prunes local WAL files after durable segments safely cover them. Most useful in shared_fs and object_store modes.

FieldTypeDefaultDescription
local_retention.time_minutesInteger2880 (48h)Delete local WAL files older than this
local_retention.size_mbInteger20480 (20 GB)Delete oldest files when total exceeds this
local_retention.check_interval_minutesInteger5How often to run the retention check

Rotation creates new WAL files. Sealed files become eligible for durable export and retention.

FieldTypeDefaultDescription
wal.rotation.max_bytesInteger (bytes)536870912 (512 MB)Rotate WAL file at this size
wal.rotation.max_hoursInteger(disabled)Rotate after this many hours. Useful for low-traffic topics.

Rarely needed. Placed under wal.advanced.

FieldTypeDefaultDescription
wal.advanced.cache_capacityInteger1024In-memory replay cache (number of messages). Higher = better cache hit rate, more memory.
wal.advanced.file_sync.interval_msInteger (ms)5000Background flush interval. Not per-message sync.
wal.advanced.file_sync.max_batch_bytesInteger (bytes)10485760 (10 MB)Force flush when write buffer exceeds this

Optional. Enables double-writing messages to Valkey for crash recovery and warm caching. See Durability & Storage for the architectural overview and Configuration Guide for deployment examples.

danube_broker.yml
storage:
write_buffer:
backend: valkey
endpoints:
- "redis://127.0.0.1:6379"
wait_replicas: 0
wait_timeout_ms: 100
on_wait_timeout: fail
max_cached_closed_segments: 5
FieldTypeDefaultDescription
write_buffer.backendString(required)Must be valkey
write_buffer.endpointsString[](required)Valkey/Redis endpoint URLs. Single endpoint = standalone mode. Multiple = cluster mode.
write_buffer.wait_replicasInteger0Replicas that must confirm each write via WAIT. Set 0 for standalone, 1+ for replicated setups.
write_buffer.wait_timeout_msInteger100Maximum wait for replica confirmation (ms)
write_buffer.on_wait_timeoutStringfailTimeout policy: fail (reject write) or ack (proceed with warning)
write_buffer.max_cached_closed_segmentsInteger5Number of closed WAL segments to retain in Valkey. Older segments are trimmed via XTRIM MINID.

Required when mode: shared_fs.

shared_fs example
storage:
mode: shared_fs
durable:
root: "/mnt/danube-shared-segments"
FieldTypeDescription
durable.rootPathShared directory visible to all brokers (e.g., NFS mount)

Required when mode: object_store. Danube uses OpenDAL for cloud storage access.

S3 example
storage:
mode: object_store
durable:
backend: s3
root: "s3://my-bucket/danube"
region: "us-east-1"
GCS example
storage:
mode: object_store
durable:
backend: gcs
root: "gcs://my-bucket/danube"
credentials_path: "/path/to/service-account.json"
Azure Blob example
storage:
mode: object_store
durable:
backend: azblob
root: "my-container/danube"
endpoint: "https://myaccount.blob.core.windows.net"
account_name: "myaccount"

S3 options:

FieldRequiredDescription
backendYess3
rootYess3://bucket/prefix
regionNoAWS region
endpointNoCustom endpoint (MinIO, etc.)
access_key / secret_keyNoStatic credentials. Prefer IAM roles in production.
profileNoAWS credentials profile name
role_arnNoIAM role to assume
session_tokenNoTemporary session credentials
anonymousNoAnonymous access for public buckets
virtual_host_styleNoVirtual-hosted-style bucket addressing

GCS options:

FieldRequiredDescription
backendYesgcs
rootYesgcs://bucket/prefix
projectNoGCP project identifier
credentials_pathNoPath to service account JSON
credentials_jsonNoInline service account JSON

Azure Blob options:

FieldRequiredDescription
backendYesazblob
rootYescontainer/prefix
endpointNoAzure Blob service endpoint
account_nameNoStorage account name
account_keyNoStorage account key

Controls pipelining behavior for reliable subscriptions. Non-reliable topics ignore this section.

danube_broker.yml
dispatch:
max_unacked_messages: 10
FieldTypeDefaultRangeDescription
dispatch.max_unacked_messagesInteger101–10,000Maximum number of unacknowledged messages per subscription. Controls how many messages the broker pipelines to a consumer before pausing. Higher values increase throughput; lower values reduce redelivery scope on failure.

The broker validates this value at startup and rejects configurations outside the allowed range.

Per-subscription overrides are available via the admin API (set-dispatch-config / get-dispatch-config). See CLI: Resources for commands.


Default resource limits applied at the broker level. These can be overridden at the namespace or topic level.

danube_broker.yml
policies:
max_producers_per_topic: 0
max_subscriptions_per_topic: 0
max_consumers_per_topic: 0
max_consumers_per_subscription: 0
max_publish_rate: 0
max_subscription_dispatch_rate: 0
max_message_size: 10485760
FieldDefaultDescription
max_producers_per_topic0 (unlimited)Maximum concurrent producers per topic
max_subscriptions_per_topic0 (unlimited)Maximum subscriptions per topic
max_consumers_per_topic0 (unlimited)Maximum concurrent consumers across all subscriptions
max_consumers_per_subscription0 (unlimited)Maximum consumers sharing a single subscription
FieldDefaultDescription
max_publish_rate0 (unlimited)Maximum publish rate (messages/second)
max_subscription_dispatch_rate0 (unlimited)Maximum dispatch rate per subscription (messages/second)
FieldDefaultDescription
max_message_size10485760 (10 MB)Maximum single message size in bytes. Very large messages impact performance.