Partitions

Topics are split into Partitions.

Messages in each partition are ordered.

Partition 0 - 0 1 2 3 4 5 <--- Add new message, create new Offset

Order is guaranteed only within a single partition, not across partitions.

Data is assigned randomly to a partition unless a key is provided.

You can have as many partitions per Topic you want.

References

Quote

Topics are additionally broken down into a number of partitions. Going back to the “commit log” description, a partition is a single log. Messages are written to it in an append-only fashion and are read in order from beginning to end (Page 5) #✂️

Flashcards

Topics are split into::: Partitions make up

Partitions contain:: a series of ordered Messages

An offset::: denotes a point in a Partition associated with a Message

Partition ordering guarantees::: Messages ordered in a single Partition

Partitions ordering doesn't guarantee::: Messages ordered across Partitions

Topics can have any number of Partitions