Status
Current state: Under Discussion
Discussion thread: TBD
JIRA: KAFKA-8880
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Motivation
We've observed that many usage of the consumer.committed calls are not only for a single partition, but for a batch of partitions. On the other hand, the OffsetFetchRequest protocol actually allows for multiple partitions within one request.
So it's a natural proposal to extend our existing `consumer#committed` function to take a list of topic-partitions.
Public Interfaces
Briefly list any new interfaces that will be introduced as part of this proposal or any existing interfaces that will be removed or changed. The purpose of this section is to concisely call out the public contract that will come along with this feature.
@Deprecated OffsetAndMetadata committed(TopicPartition partition); OffsetAndMetadata committed(TopicPartition partition); /** /** * @see KafkaConsumer#committed(TopicPartition, Duration) * @see KafkaConsumer#committed(TopicPartition, Duration) */ */ @Deprecated OffsetAndMetadata committed(TopicPartition partition, final Duration timeout); OffsetAndMetadata committed(TopicPartition partition, final Duration timeout); /** * @see KafkaConsumer#committed(Set) */ Map<TopicPartition, OffsetAndMetadata> committed(Set<TopicPartition> partitions); /** * @see KafkaConsumer#committed(Set, Duration) */ Map<TopicPartition, OffsetAndMetadata> committed(Set<TopicPartition> partitions, final Duration timeout);
Proposed Changes
Describe the new thing you want to do in appropriate detail. This may be fairly extensive and have large subsections of its own. Or it may be a few sentences. Use judgement based on the scope of the change.
Compatibility, Deprecation, and Migration Plan
- What impact (if any) will there be on existing users?
- If we are changing behavior how will we phase out the older behavior?
- If we need special migration tools, describe them here.
- When will we remove the existing behavior?
Rejected Alternatives
If there are alternative ways of accomplishing the same thing, what were they? The purpose of this section is to motivate why the design is the way it is and not some other way.