With 5 consumers and 10 partitions, how many partitions per consumer and is any consumer idle?

Study for the CCDAK Apache Kafka Test. Use flashcards and multiple choice questions with hints and explanations for each question. Prepare thoroughly for your exam!

Multiple Choice

With 5 consumers and 10 partitions, how many partitions per consumer and is any consumer idle?

Explanation:
Partitions in a topic are the units of parallelism, and in a consumer group each partition is assigned to exactly one consumer at a time. The total of 10 partitions is divided among the 5 consumers, and because 10 is evenly divisible by 5, each consumer gets two partitions. That means every consumer has work to do, so none are idle. If the numbers weren’t divisible (or if there were more consumers than partitions), some consumers could end up idle or unevenly loaded.

Partitions in a topic are the units of parallelism, and in a consumer group each partition is assigned to exactly one consumer at a time. The total of 10 partitions is divided among the 5 consumers, and because 10 is evenly divisible by 5, each consumer gets two partitions. That means every consumer has work to do, so none are idle. If the numbers weren’t divisible (or if there were more consumers than partitions), some consumers could end up idle or unevenly loaded.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy