Skip to content
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

Add list consumer groups offsets #1643

Merged
merged 1 commit into from
Nov 18, 2018
Merged

Conversation

jeffwidman
Copy link
Collaborator

@jeffwidman jeffwidman commented Nov 17, 2018

Add list_consumer_group_offsets() to support fetching the offsets of a consumer group.

Note: As far as I can tell (the Java code is a little inscrutable), the
Java AdminClient doesn't allow specifying the coordinator_id or the
partitions.

But I decided to include them because they provide a lot of additional
flexibility:

  1. allowing users to specify the partitions allows this method to be used even for
    older brokers that don't support the OffsetFetchRequest_v2

  2. allowing users to specify the coordinator ID gives them a way to
    bypass a network round trip. This method will frequently be used for
    monitoring, and if you've got 1,000 consumer groups that are being
    monitored once a minute, that's ~1.5M requests a day that are
    unnecessarily duplicated as the coordinator doesn't change unless
    there's an error.

Fix #950


This change is Reviewable

@jeffwidman jeffwidman force-pushed the add-list-consumer-groups-offsets branch 3 times, most recently from e2f25cb to 06f6989 Compare November 17, 2018 11:59
@jeffwidman jeffwidman force-pushed the add-list-consumer-groups-offsets branch 2 times, most recently from 80a1a9f to 26e14b6 Compare November 18, 2018 00:49
@jeffwidman jeffwidman force-pushed the add-list-consumer-groups-offsets branch 2 times, most recently from aab66d4 to 3eba52d Compare November 18, 2018 16:42
Support fetching the offsets of a consumer group.

Note: As far as I can tell (the Java code is a little inscrutable), the
Java AdminClient doesn't allow specifying the `coordinator_id` or the
`partitions`.

But I decided to include them because they provide a lot of additional
flexibility:

1. allowing users to specify the partitions allows this method to be used even for
older brokers that don't support the OffsetFetchRequest_v2

2. allowing users to specify the coordinator ID gives them a way to
bypass a network round trip. This method will frequently be used for
monitoring, and if you've got 1,000 consumer groups that are being
monitored once a minute, that's ~1.5M requests a day that are
unnecessarily duplicated as the coordinator doesn't change unless
there's an error.
@jeffwidman jeffwidman force-pushed the add-list-consumer-groups-offsets branch from 3eba52d to b4bb1d5 Compare November 18, 2018 23:27
@jeffwidman
Copy link
Collaborator Author

The tests passed previously when this PR included a commit from another PR that hadn't been merged yet... so I just rebased to clean up the diff here in the Github UI, and now merge w/o waiting for tests to pass.

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

Successfully merging this pull request may close these issues.

1 participant