BewareMyPower commented on PR #300:
URL:
https://github.com/apache/pulsar-client-cpp/pull/300#issuecomment-1633722258
Oh it's right. But `receiveAtLeast` is also wrong because this method cannot
receive over N messages.
The proper implementation of `receiveAtMost` might be:
```c++
Result receiveAtMost(int numMessages) {
Message msg;
for (int i = 0; i < numMessages; i++) {
auto result = consumer_.receive(msg, 3000);
if (result != ResultOk) {
return result;
}
messageIdList_.emplace_back(msg.getMessageId());
}
return ResultOk;
}
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]