Kafka Topic and Partition

A Kafka topic is a named collection of partition logs. Each partition appends records in its own order and assigns offsets. Identify a position by topic, partition, and offset; offset 10 in one partition has no ordering relationship with offset 10 in another.

With stable key bytes, partitioner, and partition count, the same key maps to the same partition. That preserves append order for the partition, not global event-time order. Multiple producers may interleave records. Changing the partition count can move later records for a key while its earlier records remain in the old partition.

Partitions permit parallel work across conventional group members, but adding members cannot split one assigned partition. A hot key can therefore dominate completion time. Choose keys from ordering needs and measured load; distributing one key’s events requires an explicit way to handle the changed ordering contract.

Reference: Kafka fundamentals lab.


Discover more from Insightful Data Lab

Subscribe to get the latest posts sent to your email.

Similar Posts

Questions, corrections, or additional insights?

This site uses Akismet to reduce spam. Learn how your comment data is processed.