You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/01/10 16:34:54 UTC

[GitHub] githublaohu commented on a change in pull request #65: Realization C asynSend

githublaohu commented on a change in pull request #65: Realization C asynSend 
URL: https://github.com/apache/rocketmq-client-cpp/pull/65#discussion_r246831067
 
 

 ##########
 File path: src/extern/CProducer.cpp
 ##########
 @@ -127,6 +162,22 @@ int SendMessageSync(CProducer *producer, CMessage *msg, CSendResult *result) {
     return OK;
 }
 
+int SendMessageAsync(CProducer *producer, CMessage *msg, CSendSuccessCallback cSendSuccessCallback,CSendExceptionCallback cSendExceptionCallback){
+	if (producer == NULL || msg == NULL || cSendSuccessCallback == NULL || cSendExceptionCallback == NULL) {
+		return NULL_POINTER;
+	}
+	DefaultMQProducer *defaultMQProducer = (DefaultMQProducer *) producer;
+	MQMessage *message = (MQMessage *) msg;
+	CSendCallback* cSendCallback = new CSendCallback(cSendSuccessCallback , cSendExceptionCallback);
 
 Review comment:
   See MQClientAPIImpl::sendMessageAsync and AsyncCallbackWrap::operationComplete(90 line),and AsyncCallbackWrap::onException()[ 117 line]

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services