Name topics descriptively: {domain}.{entity}.{event-type} e.g. orders.order.created. Avoid broad topics with mixed schema types — one topic per event type is safer for schema evolution. Use Avro + Schema Registry for schema enforcement and backward/forward compatibility. Consider compacted topics for lookup data. Use prefix namespacing for multi-tenant clusters: team.{team}.{domain}.{entity}.
Lesson 4 of 6
Topic Design Best Practices
Try it in the simulator
Guided scenarios for this module — the simulator opens with the exercise already running.
- Shrink the ISR with follower lagDrag a follower's replication lag past the threshold, watch it ejected from the ISR, then let it recover.Intermediate · ~5 min
- Trigger a consumer rebalanceGrow and shrink a consumer group and watch partition assignments redistribute each time.Intermediate · ~5 min
- Survive a network partitionCut a broker off the network while its process stays alive, watch the session expire, then reconnect it.Intermediate · ~5 min
- Rebalance leadership with preferred leader electionAfter a failover leaves leadership lopsided, run a preferred leader election to restore the original balance.Intermediate · ~5 min