You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by gi...@git.apache.org on 2017/08/31 19:53:52 UTC

[GitHub] jai1 commented on a change in pull request #727: Admin Tool: Adding support to peek batch Messages

jai1 commented on a change in pull request #727: Admin Tool: Adding support to peek batch Messages
URL: https://github.com/apache/incubator-pulsar/pull/727#discussion_r136432587
 
 

 ##########
 File path: pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/PersistentTopicsImpl.java
 ##########
 @@ -565,15 +573,15 @@ public void failed(Throwable throwable) {
             if (ex != null) {
                 futures.completeExceptionally(ex);
             } else {
-                messages.add(r);
-                List<CompletableFuture<Message>> futureMessages = Lists.newArrayList();
+                messages.addAll(r);
+                List<CompletableFuture<List<Message>>> futureMessages = Lists.newArrayList();
                 for (int i = 2; i <= numMessages; i++) {
                     futureMessages.add(peekNthMessage(destination, subName, i));
 
 Review comment:
   Had discussed it with Ludwig and came to a conclusion that Message in the context this API is a single entry stored in Bookkeeper.
   
   Hence If the number of messages to peek is set to 3 then we print (3 * number of messages in batch) individually.
   
   We can re-discuss this again if you think otherwise.
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services