BewareMyPower commented on code in PR #21945:
URL: https://github.com/apache/pulsar/pull/21945#discussion_r1469606966


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java:
##########
@@ -775,25 +776,44 @@ public CompletableFuture<Void> seekAsync(MessageId 
messageId) {
             );
         }
 
-        final CompletableFuture<Void> seekFuture;
         if (internalConsumer == null) {
-            List<CompletableFuture<Void>> futures = new 
ArrayList<>(consumers.size());
-            consumers.values().forEach(consumerImpl -> 
futures.add(consumerImpl.seekAsync(messageId)));
-            seekFuture = FutureUtil.waitForAll(futures);
+            return seekAllAsync(consumer -> consumer.seekAsync(messageId));
         } else {
-            seekFuture = internalConsumer.seekAsync(messageId);
+            beforeSeek();
+            final CompletableFuture<Void> future = new CompletableFuture<>();
+            internalConsumer.seekAsync(messageId).whenComplete((__, e) -> 
afterSeek(future, e));
+            return future;

Review Comment:
   Yes (the 1st parameter should be `Collection<Consumer>`)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to