CCAAK practice question 11 of 15
A Kafka administrator notices that their consumers of Topic X are starting to fall behind. The administrator sees that Topic X has four partitions, and the consumer group has two consumers. Which change can increase the performance of the Consumer Group?
Full set: 54 questionsThe fundamental unit of parallelism for consumption in Kafka is the topic partition. A consumer group can scale its processing throughput by adding more consumer instances, up to the total number of partitions in the topic. In this scenario, the topic has four partitions, but the consumer group only has two consumers. This means each consumer is responsible for processing messages from two partitions. By increasing the number of consumers in the group to three or four, the partitions will be rebalanced across more instances, allowing the workload to be processed in parallel and increasing the overall consumption rate for the group.
A. Increase the partitions in Topic X. This alone does not help. Without adding more consumers, the existing two consumers would simply be assigned more partitions, increasing their individual load and worsening the lag.
B. Create a new consumer group for Topic X containing two (2) consumers. This creates an independent subscription to the topic. It does not improve the performance of the original consumer group that is falling behind; it only duplicates the data stream.
C. Decrease the consumer acknowledgment property to increase throughput. This is ambiguous. Producer acks affect producer durability, not consumer speed. Consumer commit frequency (auto.commit.interval.ms) is not the primary lever for scaling consumer processing power.
1. Narkhede, N., Shapira, G., & Palino, T. (2021). Kafka: The Definitive Guide (2nd ed.). O'Reilly Media.
Chapter 4, Consumers: Reading Data from Kafka, Section: "Consumer Groups and Partition Rebalance", p. 78: "If you add more consumers to a single group while consuming from a topic, you scale the reading and processing of messages from that topic. The new consumers will take over some of the partitions, lowering the load on the other consumers." This directly supports adding consumers to scale performance.
2. Apache Kafka Documentation (Official Vendor Documentation).
Section 3.4, Consumers: "If all the consumer instances have the same consumer group, then the records will effectively be load balanced over the consumer instances... This is how Kafka scales consumption. You can't, however, have more consumer instances than partitions." This confirms that adding consumers is the standard method for scaling.
3. Confluent Developer (Official Vendor Courseware).
Kafka 101, Module: Consumer Groups: "To increase the parallelism of your consumer group, you can add more consumers. Kafka will automatically assign the new consumer to a free partition. The maximum parallelism of a consumer group is the number of partitions in the topic being consumed." This explicitly states that adding consumers increases parallelism up to the partition count.
Keep practicing
Take the free CCAAK practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CCAAK practice questions
- Question 1When a broker goes down, what will the Controller do?
- Question 2A developer is working for a company with internal best practices that dictate that there…
- Question 3A company is setting up a log ingestion use case where they will consume logs from numero…
- Question 4If the Controller detects the failure of a broker that was the leader for some partitions…
- Question 5Where are Apache Kafka Access Control Lists stored'?
- Question 6Which tool is used for scalably and reliably streaming data between Kafka and other data …
