New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
Nobody can agree whether the new topic should keep seven days of history or just the latest value per key.
What you'll have at the end
A written decision, retention or compaction, with the topic config to match and one sentence on what breaks if it's wrong
You need
A Kafka topic, new or already running, with at least one downstream reader that has to make sense of what's on it, and admin access to change that topic's own config.
Not covered
How many partitions the topic needs or which field to key it on, both separate decisions this recipe assumes are already settled.
Leans on
Right-size a new Kafka topic's partitions
when the open question is how many partitions this topic needs, not how long it keeps what's on it.
Every consumer breaks without a Kafka Schema Registry check
when a compacted topic's value shape is what's changing under a key that lives forever, not its cleanup policy.
Checked 25 Aug 2026
Part of the Apache Kafka cookbook