Status
Current state: "Under Discussion"
Discussion thread: here [TBD]
JIRA: here [TBD]
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Motivation
This KIP is aim to add support for describing consumer groups to `KafkaAdminClient` class. This functionality is required on the Streams Resetter Tool as describe here:
Public Interfaces
API
Add the following API in AdminClient:
public abstract class AdminClient implements AutoCloseable { public abstract DescribeConsumerGroupResult describeConsumerGroups(Collection<String> groupIds, DescribeConsumerGroupOptions options); public DescribeConsumerGroupResult describeConsumerGroups(Collection<String> groupIds) { return describeConsumerGroups(groupIds, new DescribeConsumerGroupOptions()); } } public class DescribeConsumerGroupOptions extends AbstractOptions<DescribeConsumerGroupOptions> { } public class DescribeConsumerGroupResult { private final Map<String, KafkaFuture<ConsumerGroupDescription>> futures; ... }
This API returns a future object whose result will be available within RequestTimeoutMs, which is configured when user constructs the AdminClient.
Proposed Changes
- Add `#describeConsumerGroups(Collection<String> groupIds, DescribeConsumerGroupOptions options)` and `#describeConsumerGroups(Collection<String> groupIds)` to `AdminClient` API and
- Implement it on `KafkaAdminClient`.
- Solve
Compatibility, Deprecation, and Migration Plan
- There won't be any impact on existing users.
- There won't be any change of current behavior.
- No migration tool required.
Rejected Alternatives
We are moving one more functionality from `core`'s `AdminClient` API to `clients`'s `AdminClient` API. This is aim to remove dependencies to `core` module.
Future Work
- Streams Resetter Tool will be remove it's dependency to `core` module for `KafkaAdminClient`.