An append-only system records new entries sequentially without modifying earlier entries. Kafka can provide this log for event-driven services, but it is not a database replacement. section 5.1.1
Treating Kafka as an append-only system requires architectural trade-offs:
- Retain older messages in cheaper object storage while keeping recent data on high-performance disks. section 5.1.1
- Replay events to reconstruct service state when historical data is important for analytics, auditing, or regulatory compliance. section 5.1.1
- Preserve a database or read store as the system of record because the log lacks referential integrity, strong consistency, secondary indexes, and full SQL querying. section 5.1.1
Reconstructing customer state
Customer360Service receives profile-change events through Kafka and can rebuild its state by replaying the retained event history. Compaction and retention choices affect how much history remains and how long rebuilding takes. section 5.1.1
Figure 5.2 Using compacted topics in Kafka: you always retain the latest version of each event, allowing Kafka to act as a source of truth.
Use the compacted-topic diagram to compare retaining the latest event version with preserving a complete historical log. section 5.1.1

