Sobes.tech
Senior

Question 6. 10 messages are added to a Kafka topic, and two consumers with different consumer groups read from the topic. How many messages does each consumer read? 5 10 Depends on the number of partitions in the topic Depends on the value of replicationFactor

sobes.tech AI

Answer from AI

If a Kafka topic contains 10 messages and there are 2 consumers, each belonging to different consumer groups, then each consumer will receive all 10 messages.

This is because consumers from different groups read data independently — each group receives the full stream of messages.

If the consumers were in the same group, then the messages would be distributed among them (considering the number of partitions).

Therefore, the correct answer is: 10 messages.