Apache Kafka·Apache Kafka essentials

Consumers

Consumer groups share partitions and track offsets.

Intermediate 10 min read Lesson 3 of 150 Challenge included
What you will be able to do
  • One partition per consumer in a group.
  • Commit offsets after processing.
  • Rebalance when members change.

In plain English

Consumer groups share partitions and track offsets.

  • One partition per consumer in a group.
  • Commit offsets after processing.
  • Rebalance when members change.
Consumer.javaJava
consumer.subscribe(List.of("lessons"));
while (true) {
  var records = consumer.poll(Duration.ofMillis(500));
  records.forEach(r -> process(r.value()));
}
Your turn

Explain it back

Easy

Answer from memory: How many consumers in a group read one partition at a time?

TEXT · starter
Your answer…
Check your understanding before moving on.
Knowledge checkQuestion 1

How many consumers in a group read one partition at a time?

Select an answer to continue
Study tools

Make it yours.

Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.

Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign in
Finished reading?

Lock in what you just learned.

Mark this lesson complete to save your place and move one step closer to the certificate.

Next: Delivery guarantees
Lesson 3 of 150 · 0% of course