Sobes.tech
Middle+

What happens with 5 consumers and 3 partitions?

sobes.tech AI

Answer from AI

If you have 5 consumers and 3 partitions in a system, for example, Kafka, the distribution will be as follows:

  • Each partition can only be assigned to one consumer within a consumer group.
  • Since there are fewer partitions than consumers, 3 consumers will receive data from the partitions, while 2 consumers will remain unassigned and idle.

Thus, the maximum number of active consumers is 3, equal to the number of partitions. To effectively utilize all 5 consumers, you need to increase the number of partitions to 5 or more.

What happens with 5 consumers and 3 partitions… - sobes.tech