Inspecting topics, partitions, and consumer groups
In production, I use Kafka CLI tools to inspect topic metadata, partition leadership, replication health, and consumer progress before making changes. I start with the bootstrap server, describe the topic, and then inspect the relevant consumer group. I correlate this snapshot with broker and client metrics rather than treating one command as a complete diagnosis.
The topic description shows partition IDs, leaders, replicas, and ISR (in-sync replicas). A partition without a usable leader can affect reads and writes.
Consumer-group output commonly includes CURRENT-OFFSET, LOG-END-OFFSET, and LAG. Lag is an offset difference, not elapsed time.
Lag isolated to a few partitions can indicate hot keys or uneven processing; lag rising broadly can indicate insufficient capacity, rebalances, or downstream bottlenecks.
Under-replicated partitions warrant checking broker health and replication metrics before intervening.
Common mistake: assuming nonzero lag means failure, or that low lag proves business processing is correct. Committed offsets reflect recorded progress, and correctness depends on when the application commits.
Modern CLI workflows use --bootstrap-server. ZooKeeper-based workflows are obsolete in modern Kafka releases; exact options vary by distribution and version.
0-2 years experience
2-5 years experience
5-8 years experience
8+ years experience