Start here. This is the direct spoken answer to practice first.
Why this question matters
Retention defines how far consumers can rewind; compaction preserves a latest value per key, not a complete history. Neither choice automatically creates an audit log or a permanent source of truth.
I start from recovery requirements. Retention must exceed the longest supported consumer outage plus detection and repair time. If projections rebuild from the stream, the retained or archived history must cover a full rebuild. Compaction helps when consumers need the latest state per key, such as the newest customer profile, but it may remove intermediate changes and therefore cannot replace a full audit history.