zhaijack 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_r167156439
########## File path: pulsar-client/src/main/java/org/apache/pulsar/client/api/Reader.java ########## @@ -62,4 +62,14 @@ * Return true if the topic was terminated and this reader has reached the end of the topic */ boolean hasReachedEndOfTopic(); + + /** + * Check if there is message that has been published successfully to the broker in the topic. + */ + Boolean hasMessageAvailable() throws PulsarClientException; Review comment: Yes. we have keep the value as `lastMessageIdInBroker` in `ConsumerImpl`, it will return from client most of the time, will not call into broker. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services