Skip to content

ADR 0006 Redpanda Default Broker

Tiana_ edited this page May 30, 2026 · 1 revision

ADR-0006: Redpanda default broker (Kafka API-compatible)

Status: Accepted Date: 2026-04-25 Decider: Maintainer

Context

The event bus is critical: outbox dispatching, AML consumer, webhook delivery, audit shipping all rely on it. Choices among Kafka-API-compatible brokers (so adopters can swap as needed):

  1. Apache Kafka with KRaft mode (post-ZooKeeper) - industry standard, mature, complex
  2. Apache Kafka with ZooKeeper - legacy mode, deprecated path
  3. Redpanda - Kafka API-compatible, single binary, no ZooKeeper, no JVM
  4. WarpStream - Kafka API on S3 - interesting but newer
  5. Confluent Cloud / AWS MSK - managed services for production

For local development (docker compose up):

  • Apache Kafka: ~30s startup, requires ZooKeeper or KRaft setup, ~1.5 GB RAM, JVM heap tuning
  • Redpanda: ~3s startup, single binary, ~200 MB RAM, no JVM

For production (where adopter deploys to their cluster), all options are viable as long as they speak Kafka API.

Decision

Redpanda as the default broker in docker compose and Helm chart values:

  • Bundled in docker compose for fast local DX
  • Helm chart default values.yaml ships Redpanda manifests
  • Adopters can swap by changing values.broker.kind or pointing bootstrap-servers at any Kafka-compatible cluster
  • No code changes between brokers (we use Kafka client API only)

Production guidance documented:

  • Self-hosted: Strimzi operator (Apache Kafka on K8s) or Redpanda K8s operator
  • Managed: Confluent Cloud, AWS MSK, Aiven for Apache Kafka, Redpanda Cloud
  • All work without changes

Consequences

Positive

  • 30-second sandbox: critical for our killer DX. Apache Kafka + ZK was 5x slower
  • Lower memory floor: dev laptops with 8 GB run smoothly
  • No JVM overhead in broker layer (Redpanda is C++)
  • Same Kafka client code: producers/consumers identical regardless of broker
  • Standard Kafka topics: tiered storage, compaction, ACLs all work
  • Adopter freedom: drop in any Kafka-API broker for production

Negative

  • Newer than Apache Kafka: less production-tested at extreme scale (though Redpanda has shipped to enterprise customers since 2020)
  • License: Redpanda Community Edition is BSL-licensed (limited commercial use restriction). For our docker-compose default this is fine; adopters running Redpanda commercially read the Redpanda license terms (most adopters use Apache Kafka in production anyway)
  • Some Kafka feature lag: schemas, exotic configs occasionally behind Apache Kafka. Acceptable for our use cases.

Neutral

  • Some adopters prefer Apache Kafka for "principles" reasons. Helm chart documents the swap (5-line config change).

Alternatives considered

Apache Kafka as default

  • Rejected for default: 30s startup, 1.5 GB RAM hurts DX
  • First-class supported as alternative: Helm values-kafka.yaml runs Kafka via Strimzi
  • Production-proven; adopters in regulated environments often pick Kafka

Confluent Cloud / Managed Kafka as default

  • Rejected: requires SaaS sign-up, conflicts with offline / self-hosted DX
  • Documented as production option

Pulsar

  • Rejected: not Kafka-API-compatible (different client lib)
  • Adopters can wrap our EventPublisher interface to use Pulsar - out of OSS scope

NATS / NATS JetStream

  • Rejected: incompatible with our Kafka-API-based outbox dispatcher
  • Different consumer group semantics

EventStoreDB

  • Rejected: not a streaming bus; designed for event sourcing primary store
  • Different mental model

In-process event bus (Spring ApplicationEvent)

  • Rejected: doesn't survive process restart
  • Doesn't scale beyond one JVM

Validation

  • Performance test: 5000 events/sec sustained on Redpanda single node
  • Compatibility test: same producer code emits same messages on Apache Kafka 3.8 and Redpanda 24.3
  • Switch test: docker-compose -f base.yml -f kafka.yml up starts Apache Kafka instead, all integration tests pass

Related

  • Architecture-Event-Flow - full event bus design
  • deploy/docker-compose.yml - default Redpanda config
  • deploy/docker-compose.kafka.yml - Apache Kafka via Bitnami chart
  • deploy/helm/fincore-engine/values-kafka.yaml - production Kafka via Strimzi

Clone this wiki locally