Adam Lee
Adam Lee

Reputation: 25738

How to control the kafka strategy to distributed message when using the same consumer group

When using the consumer group to control the message delivery, how to ensure each consumer within the same consumer group to receive the message in round robin? Also, what's the default strategy Kafka use, it seems all message could go to one consumer all the time?

Upvotes: 1

Views: 75

Answers (1)

amethystic
amethystic

Reputation: 7089

Consumers in one consumer group do not receive records in a round-robin manner. Instead, they are assigned with different partitions for all the subscribed topics. If you always see only one consumer gets the messages, check the partition number for the topic you created and subscribe, making sure there are more than one partition at least.

Upvotes: 4

Related Questions