You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "philipnee (via GitHub)" <gi...@apache.org> on 2023/03/12 23:57:51 UTC
[GitHub] [kafka] philipnee commented on a diff in pull request #13380: KAFKA-14468: Committed API
philipnee commented on code in PR #13380:
URL: https://github.com/apache/kafka/pull/13380#discussion_r1133345989
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/PrototypeAsyncConsumer.java:
##########
@@ -306,13 +310,28 @@ public OffsetAndMetadata committed(TopicPartition partition, Duration timeout) {
}
@Override
- public Map<TopicPartition, OffsetAndMetadata> committed(Set<TopicPartition> partitions) {
- throw new KafkaException("method not implemented");
+ public Map<TopicPartition, OffsetAndMetadata> committed(final Set<TopicPartition> partitions) {
+ return committed(partitions, Duration.ofMillis(defaultApiTimeoutMs));
}
@Override
- public Map<TopicPartition, OffsetAndMetadata> committed(Set<TopicPartition> partitions, Duration timeout) {
- throw new KafkaException("method not implemented");
+ public Map<TopicPartition, OffsetAndMetadata> committed(final Set<TopicPartition> partitions,
+ final Duration timeout) {
+ maybeThrowInvalidGroupIdException();
+ final OffsetFetchApplicationEvent event = new OffsetFetchApplicationEvent(partitions);
+ eventHandler.add(event);
+ try {
+ return event.complete(Duration.ofMillis(100));
+ } catch (ExecutionException | InterruptedException | TimeoutException e) {
+ throw new KafkaException(e);
Review Comment:
I actually don't know if this is right.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org