co-location
Placing related records in the same partition, by giving them the same key, so one consumer sees them together and in order.
In more detail
Co-location is what makes per-entity processing, such as all events for one order, safe to do in a single consumer. It depends on the partition count staying the same.
Related terms
- record key — An optional value attached to a record that decides which partition it goes to, so all records with the same key stay together and in order.
- ordering guarantee — A promise about whether messages are processed in the order they were sent, which is often limited to one key or partition.
- partitioner — The producer component that chooses which partition each record is sent to.
Taught in
- Topics, Partitions And Where A Record Lands — Apache Kafka & Event Streaming
- Watching Lag And Sizing Partitions — Apache Kafka & Event Streaming