-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate consumer group behavior #15
Comments
Partition assignment in a consumer groupWhen a consumer wants to join a group it sends a After deciding on the partition assignment the group leader sends the list of assignments back to the Group Coordinator which then sends the information to all consumers. Each consumer only sees its own assignment, the leader is the only client process that has the full list of consumers in the group. This partition assignment process happens whenever their is a rebalance event. The way consumers maintain their membership in a consumer group and their ownership of the partitions assigned to them is by sending heartbeats to a Kafka Broker that is designated as the Group Coordinator. The Group Coordinator broker can be different for different consumer groups. If a consumer stops sending heartbeats for long enough its session will time out and the group coordinator will consider it dead and trigger a rebalance. |
Consumer Group behavior in KaffeI spun up a simple Kaffe project to see how it handles consumer groups in nodes that are completely isolated from each other except for the connection to Kafka. Things look good! I changed my local whitelist topic to have 10 partitions. I then joined a single kafkatest node to the single consumer node started
second consumer node started
group coordinator quit
It appears that group coordination is indeed correctly happening through Kafka. 👍 |
Good background info (not that we doubted Kafka's ability to coordinate consumers)! |
I had some doubts. 😄 |
When @objectuser spun up multiple dynos in the same consumer group we saw that offsets were not advancing forward as expected. In fact it appeared offsets were resetting over each other.
I suspected that consumer groups required more explicit coordination on our side vs kafka but that turns out to not be the case. This issue summarizes my results.
The text was updated successfully, but these errors were encountered: