- Reads events from one or more topic partitions.
- Processes each event (for example, updating a UI, writing results to a database, invoking downstream services, or making a decision).
- Optionally commits its progress (offsets) so it can resume processing later.

Consumers read and process messages but do not remove them from Kafka. Message retention and deletion are controlled by broker-side settings such as retention time, size-based retention, and compaction.
- Sequential access
- Each partition is an ordered, immutable sequence of records identified by offsets.
- A consumer reads records in increasing offset order from a configured or committed position, guaranteeing per-partition ordering (equivalent to reading a log from start to end).
- Partition independence
- Ordering is only guaranteed inside a single partition; Kafka does not provide global ordering across partitions of the same topic.
- Each partition acts as an independent ordered log. Consumers can read multiple partitions concurrently, but cross-partition message order is not guaranteed.
- Historical control
- Consumers commonly read new messages as they arrive. For consumer groups without a prior committed offset,
auto.offset.resetcontrols whether they start at theearliestorlatestoffset. - Consumers can intentionally read older offsets (replay) as long as the data is still retained by brokers.
- Consumers manage and commit offsets to checkpoint processing progress and support reprocessing when needed.

- Consumers request records from brokers (Kafka does not push records to consumers).
- Because consumers initiate reads, they control consumption rate and can apply backpressure by adjusting poll frequency or processing concurrency.
- Consumers manage offsets (their current read position) and typically commit offsets to Kafka or an external store to checkpoint progress and enable fault recovery.
- In the next lesson we’ll set up a Kafka consumer and demonstrate consuming messages from a topic.
- For implementation details and client libraries, consult the official documentation and client-specific guides linked below.
- Kafka: Consumers — Apache Kafka Documentation
- Kafka Retention Policies and Log Compaction
- Kafka Consumer Groups and Offsets