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_r194107081
##########
File path: pulsar-client-cpp/lib/ConsumerImpl.h
##########
@@ -166,6 +170,18 @@ class ConsumerImpl : public ConsumerImplBase,
MessageCryptoPtr msgCrypto_;
+ Optional<MessageId> lastMessageInBroker_;
Review comment:
Rather than an optional, just initialized to MessageId(). You can avoid the
logic below in lastMessageIdAvailable
----------------------------------------------------------------
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