momo-jun commented on code in PR #17429:
URL: https://github.com/apache/pulsar/pull/17429#discussion_r977117238
##########
pulsar-client-cpp/include/pulsar/Consumer.h:
##########
@@ -113,6 +113,31 @@ class PULSAR_PUBLIC Consumer {
*/
void receiveAsync(ReceiveCallback callback);
+ /**
+ * Batch receiving messages.
+ *
+ * <p>This calls blocks until has enough messages or wait timeout, more
details to see {@link
+ * BatchReceivePolicy}.
+ *
+ * @param msgs a non-const reference where the received messages will be
copied
+ * @return ResultOk when a message is received
+ * @return ResultInvalidConfiguration if a message listener had been set
in the configuration
+ */
+ Result batchReceive(Messages& msgs);
+
+ /**
+ * Async Batch receiving messages.
+ * <p>
+ * Retrieves a message when it will be available and completes callback
with received message.
+ * </p>
+ * <p>
+ * batchReceiveAsync() should be called subsequently once callback gets
completed with received message.
+ * Else it creates <i> backlog of receive requests </i> in the application.
+ * </p>
+ * @param BatchReceiveCallback will be completed when messages is available
Review Comment:
```suggestion
* @param BatchReceiveCallback will be completed when messages are
available.
```
--
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]