[GitHub] [pulsar] merlimat commented on a change in pull request #3764: Fixed Reader.HasNext() in Go client

2019-03-06 Thread GitBox
merlimat commented on a change in pull request #3764: Fixed Reader.HasNext() in 
Go client
URL: https://github.com/apache/pulsar/pull/3764#discussion_r263119822
 
 

 ##
 File path: pulsar-client-go/pulsar/reader_test.go
 ##
 @@ -218,3 +219,49 @@ func TestReaderCompaction(t *testing.T) {
assert.Nil(t, msg)
assert.NotNil(t, err)
 }
+
+func TestReaderHasNext(t *testing.T) {
+   topic := fmt.Sprintf("TestReaderHasNext-%d", rand.Int())
+   ctx := context.Background()
+
+   client, err := NewClient(ClientOptions{
+   URL: "pulsar://localhost:6650",
+   //Logger: func(level logutil.LoggerLevel, file string, line 
int, message string) {
 
 Review comment:
   Good point.. :) removing these


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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


[GitHub] [pulsar] merlimat commented on a change in pull request #3764: Fixed Reader.HasNext() in Go client

2019-03-06 Thread GitBox
merlimat commented on a change in pull request #3764: Fixed Reader.HasNext() in 
Go client
URL: https://github.com/apache/pulsar/pull/3764#discussion_r263083466
 
 

 ##
 File path: pulsar-client-cpp/lib/ConsumerImpl.cc
 ##
 @@ -1039,8 +1040,7 @@ void 
ConsumerImpl::hasMessageAvailableAsync(HasMessageAvailableCallback callback
 return;
 }
 
-BrokerGetLastMessageIdCallback callback1 = [this, lastDequed, 
callback](Result result,
-
MessageId messageId) {
+getLastMessageIdAsync([this, lastDequed, callback](Result result, 
MessageId messageId) {
 if (result == ResultOk) {
 
 Review comment:
   I don't think that this would improve readability


This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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