Skip to content
Theory · Kafka producers · lesson 1 of 8

From key to partition

Both cards with the key u1 pass the murmur2 desk and land in the same ledger 1 of the three ledgers 0 1 2

A Kafka producer decides on its own which partition of a topic gets a record, and order depends on that decision. The records of one order must land in one partition, or a consumer may see the payment before the creation. For that a record has a key, and the producer has a rule that turns the key into a partition number.

In this lesson

  • Key and partitioner
  • Let's check on a live cluster
  • New partitions change the address
  • A record without a key
  • Common mistake
  • Key points