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-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to