BewareMyPower commented on code in PR #254:
URL: https://github.com/apache/pulsar-client-cpp/pull/254#discussion_r1169412170


##########
include/pulsar/c/consumer.h:
##########
@@ -119,6 +121,17 @@ PULSAR_PUBLIC void 
pulsar_consumer_receive_async(pulsar_consumer_t *consumer,
 PULSAR_PUBLIC pulsar_result pulsar_consumer_batch_receive(pulsar_consumer_t 
*consumer,
                                                           pulsar_messages_t 
**msgs);
 
+/**
+ * Async batch receiving messages.
+ *
+ * @param callback
+ * 1. When it's callback call result is `ResultOk`, `*msg` will point to the 
memory that
+ * is allocated internally. You have to call `pulsar_messages_free` to free it.
+ * 2. If callback call result is not `ResultOk`, `*msg` will is nullptr.

Review Comment:
   ```suggestion
    * 1. When the result in the callback is `ResultOk`, `*msg` will point to 
the memory that
    * is allocated internally. You have to call `pulsar_messages_free` to free 
it.
    * 2. If the result in the callback is not `ResultOk`, `*msg` will be 
nullptr.
   ```
   
   Fix wrong semantic.
   
   And I think this description is wrong. Because the asynchronous API does not 
have a `msg` parameter.



-- 
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]

Reply via email to