BewareMyPower commented on code in PR #17452:
URL: https://github.com/apache/pulsar/pull/17452#discussion_r964390078
##########
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:
It makes sense to me. I think we should note it in the docs, or add it to
examples.
--
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]