liveBook · Manning

Partition

As explained in Akka in Action, Second Edition

A partition is an ordered subdivision of a Kafka topic to which records are assigned and within which offsets identify record positions.

A partition is an ordered subdivision of a Kafka topic. Records receive offsets within a partition, allowing consumers to identify positions and resume processing. section 14.1.1

Consumer groups distribute topic partitions among their consumers. Kafka adjusts these assignments through rebalancing: a consumer may receive several partitions, while surplus consumers remain inactive. section 14.1.1

Partition behavior matters when consuming records:

  • An offset identifies a record's position in its partition. section 14.1.1
  • Consumers can begin at a selected offset, such as the first or last record. section 14.1.1
  • A committed offset persists the consumer's position so reading can resume after communication or broker failure. section 14.1.1
  • If a consumer stops polling within the configured interval, its partitions can be assigned to another consumer in the group. section 14.1.2

One consumer assigned to test-0

A consumer subscribing to test can receive the assignment {partitions=[test-0]}. If no committed offset exists, consumption resets to offset 0; records such as hello and hi then appear at offsets 0 and 1.

How Akka in Action, Second Edition covers it

How deep it goes
Explains offsets, committed positions, consumer-group assignment, rebalancing, and failure reassignment.
Examples
Uses the test topic, test-0 assignment, offset reset to zero, and hello and hi records at offsets 0 and 1.
What it assumes
Assumes Kafka consumer terminology while defining offsets, consumer groups, assignments, and rebalancing.
What you can do after
Operate Kafka consumers by reading assigned partitions, selecting starting offsets, and resuming from committed positions.
How it connects
Ties partitions to Kafka topics, offsets, consumer groups, rebalancing, broker failures, and consumer polling.

Also explained in

Compare how 4 books explain partition →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Akka in Action, Second Edition. The section links point to the parts of the book it draws on.