You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/01/21 03:08:45 UTC

[GitHub] sijie commented on a change in pull request #1066: Issue 937: add CommandGetLastMessageId to make reader know the end of topic

sijie commented on a change in pull request #1066: Issue 937: add CommandGetLastMessageId to make reader know the end of topic
URL: https://github.com/apache/incubator-pulsar/pull/1066#discussion_r162799512
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/api/Consumer.java
 ##########
 @@ -278,4 +277,19 @@
      * @return a future to track the completion of the seek operation
      */
     CompletableFuture<Void> seekAsync(MessageId messageId);
+
+    /**
+     * Gets last message id of Topic.
+     *
+     * @return the last message id
+     */
+    MessageId getLastMessageId() throws PulsarClientException;
 
 Review comment:
   hmm `consumer.hasMessageAvaiable()` - I am not sure it is a good idea. However it introduces non-deterministic behaviour to users, where user will have no idea where to stop. but I agree rate-limiting is also important, however should we consider rate-limiting at broker side for this message, rather than do the rate-limiting at client side. In that way, it is a probably a better solution for long term. thoughts?

----------------------------------------------------------------
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