Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Feature Request: Expose Consumer Group Member UserData #70

Closed
msample opened this issue Aug 22, 2016 · 3 comments
Closed

Feature Request: Expose Consumer Group Member UserData #70

msample opened this issue Aug 22, 2016 · 3 comments

Comments

@msample
Copy link

msample commented Aug 22, 2016

For Example, Add Config.Group.Member.UserData []byte and propagate with JoinGroup requests.

The Kafka protocol appears to allow consumer group members to provide 'user data' for partition assignment balancing protocols. This user- data is shared with the balancer, which is selected from one of the members of the consumer group. The balancer then allocates partitions to the group members, possibly based on the user-data.

Even though the current sarama-cluster balancer implementation does not act on user-data it provides value to external tools: E.g. external routing of a web request to a specific partition-owner in consumer group (if the user data contained http host:port info).

External tools could extract this info from the broker without joining the group by something like:

client, err := scluster.NewClient(...)
broker, err := client.Coordinator(groupName)
req := &sarama.DescribeGroupsRequest{Groups: []string{groupName}}
resp, err := broker.DescribeGroups(req)
groupDesc := resp.Groups[0]

Not sure how one would watch for changes to the partition assignments without being part of the consumer group though. In a reasonably stable environment this may not be too bad so long as there is a fall back for routing (e.g. a redirect).

@dim
Copy link
Member

dim commented Aug 22, 2016

Sounds like a good idea, but could you please submit a PR?

@msample
Copy link
Author

msample commented Aug 24, 2016

Sure, I'll try to get to it in the next few weeks.

@dim
Copy link
Member

dim commented Nov 2, 2016

Closing for now, please re-open as a PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants