ivankelly commented on a change in pull request #1861: Cpp client: add 
getLastMessageId and hasMessageAvailable in consmer and reader
URL: https://github.com/apache/incubator-pulsar/pull/1861#discussion_r194104557
 
 

 ##########
 File path: pulsar-client-cpp/lib/ConsumerImpl.h
 ##########
 @@ -166,6 +170,18 @@ class ConsumerImpl : public ConsumerImplBase,
 
     MessageCryptoPtr msgCrypto_;
 
+    Optional<MessageId> lastMessageInBroker_;
+    void brokerGetLastMessageIdListener(Result res, MessageId messageId,
+                                        BrokerGetLastMessageIdCallback 
callback);
+
+    inline bool lastMessageIdAvailable() {
 
 Review comment:
   This should be split into two methods, lastMessageIdDequeued and 
lastMessageIdInBroker, and the comparison should be done at the callsite (see 
other comment).

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


With regards,
Apache Git Services

Reply via email to