# Kafka

> Kafka protocol on PostgreSQL: an open question, with no design or code yet.

---

LLMS index: [llms.txt](/llms.txt)

---

> [!NOTE] Exploration only
> Mimus has no Kafka design, code or schedule. The 2026-11-07 scope proposal ruled the Kafka protocol out. This
> section keeps the question open and collects what would have to be answered first.

A Kafka-compatible endpoint would let producers and consumers use the Kafka protocol (default port 9092) against
topics stored in PostgreSQL. It would belong to the service protocol class: many long-lived client connections,
multiplexed by a gateway, with the log and offsets in an extension.

## Questions to answer first {#questions}

- **Log model**: how partitions and offsets map onto MVCC tables, and what ordering a reader sees across concurrent
  commits.
- **Retention and compaction**: how topic retention and log compaction interact with `VACUUM` and table bloat.
- **Consumer groups**: where group membership, rebalancing and committed offsets live, and how they survive a
  failover.
- **Throughput**: what produce and fetch rates are realistic when every write goes through WAL.
- **Semantics**: which Kafka API versions, idempotent producers and transactions are in scope.
- **Value over existing options**: what a Kafka endpoint adds beyond Redis Streams through
  [pgredis](/docs/redis/), logical decoding, or running Apache Kafka next to PostgreSQL.

## Related {#related}

- Pigsty already deploys Apache Kafka itself as a separate module; that is unrelated to a PostgreSQL-backed Kafka
  protocol.
- The transactional outbox pattern with pgredis Streams covers some of the same use cases on PostgreSQL today.

---

Backlinks:

- [Protocol & Capability Matrix](/docs/reference/matrix/)
