Event Logs & Brokers

The durable, partitioned, replayable append-only log as data infrastructure. Topics, partitions, keys, consumer groups, offsets and retention — and why replay is the feature that matters most here.

The Event Log

An append-only, immutable, ordered sequence of facts that each reader moves through at its own pace — the primitive underneath brokers, replication, CDC and stream processing.

Q · What can an append-only log of events answer that a table of current state cannot?
Message Brokers: Log-Shaped and Queue-Shaped

Two different products wearing one word. A queue distributes work and forgets; a log stores records and lets anyone re-read them. Neither is the upgrade of the other.

Q · Does this data need a durable replayable log, or a queue that hands each message to exactly one worker and deletes it?
Kafka as a Log, Not a Queue

A partitioned, durable, append-only log with independent consumer groups and time-based retention. Records survive being read, which is the property everything else in a data platform is built on.

Q · Why does calling Kafka a message queue lead teams to build the wrong thing?
Topics and Partitions

A topic is not one log — it is several. Ordering holds inside a partition and nowhere else, and that single sentence explains most of the surprises in a streaming platform.

Q · If a topic is ordered, why did the payment event arrive before the order event that caused it?
Event Keys and Partition Assignment

The key hashes to a partition, and the partition is the scope of ordering. Change the partition count and the hash re-maps, so a key's future loses order against its own past.

Q · Which records need to stay in order relative to each other, and what key makes that true?
Consumer Groups and the Parallelism Ceiling
▶ lab

A group divides a topic's partitions among its instances, one partition to at most one instance. Partition count is therefore the hard ceiling on parallelism, and instances beyond it do nothing at all.

Q · Consumer lag is growing and we have doubled the number of instances. Why has nothing changed?
Retention and Replay

Retention is not a storage setting. It is the maximum age of a bug you can fix by replaying instead of reconstructing — a recovery-window decision that happens to be paid for in disk.

Q · A transformation bug has been producing wrong numbers for three weeks. Can we fix it by reprocessing, or do we have to reconstruct?
Offsets and Commits

Commit before processing and you get at-most-once. Commit after and you get at-least-once. There is no third option unless the commit and the output write share a transaction.

Q · A consumer crashes between reading a record and writing its result. Was that record lost, or will it be processed twice?