Skip to main content

Kafka Topic Planner

Configure your Apache Kafka topic parameters — partition count, replication factor, retention, and message size. Get storage estimates, throughput capacity, and a ready-to-run kafka-topics.sh create command.

✓ Storage estimator ✓ Throughput calculator ✓ CLI command generator

Topic Configuration

Alphanumeric, hyphens, underscores
1 – 100
1 – 5 (3 recommended for production)
1 – 720 hours (168 = 7 days)
Default 1024 KB (1 MB)
For storage estimate

Frequently Asked Questions

How many partitions should I use for a Kafka topic?▼

Partitions determine parallelism. A common rule: number of partitions = max(target throughput / single-partition throughput, num consumers in consumer group). Start conservatively (e.g. 6–12) because you can increase partitions later but cannot decrease them without recreating the topic. More partitions mean more file handles and leader elections, so avoid over-partitioning.

What is the replication factor in Kafka?▼

Replication factor controls how many broker copies exist for each partition. A factor of 3 means 1 leader + 2 followers — the industry standard for production clusters. The broker count must be >= replication factor. Higher replication improves fault tolerance (tolerate N-1 broker failures) but increases storage and network usage proportionally.

How does Kafka retention work?▼

Kafka retains messages based on time (retention.ms) or size (retention.bytes). When a segment exceeds the retention window, it is eligible for deletion. Default is 7 days (604800000 ms). For event sourcing or audit logs you might set retention to weeks or months. Compacted topics use log compaction instead — keeping only the latest value per key indefinitely.

What is the max.message.bytes setting?▼

max.message.bytes controls the maximum size of a single message (default 1 MB). If your pipeline produces large payloads (images, documents), increase this alongside fetch.message.max.bytes on consumers and replica.fetch.max.bytes on brokers. For very large payloads consider storing data externally and passing a reference key via Kafka instead.

How do I estimate Kafka storage requirements?▼

Storage per partition = (throughput MB/s per partition) × (retention seconds). Total storage = storage per partition × num partitions × replication factor. Add 20–30% overhead for index files and segment gaps. For a topic with 100 MB/s throughput, 10 partitions, replication factor 3, and 24h retention: (10 MB/s × 86400s × 3) ≈ 2.5 TB across the cluster.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →