equanz commented on code in PR #17452:
URL: https://github.com/apache/pulsar/pull/17452#discussion_r964464127
##########
pulsar-client-cpp/lib/c/c_Consumer.cc:
##########
@@ -60,6 +60,20 @@ pulsar_result
pulsar_consumer_receive_with_timeout(pulsar_consumer_t *consumer,
return (pulsar_result)res;
}
+static void handle_receive_callback(pulsar::Result result, pulsar::Message
message,
+ pulsar_receive_callback callback, void
*ctx) {
+ if (callback) {
+ pulsar_message_t *msg = new pulsar_message_t;
+ msg->message = message;
+ callback((pulsar_result)result, msg, ctx);
Review Comment:
Okay. I'll add an example about async consume in this PR. Also, I'll create
an issue about other async functions.
--
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]