ShannonDing commented on a change in pull request #2: Make code be consistent 
with Golang Specfication
URL: https://github.com/apache/rocketmq-client-go/pull/2#discussion_r235263862
 
 

 ##########
 File path: core/cfuns.go
 ##########
 @@ -14,17 +14,31 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package client_test
+package rocketmq
 
+/*
+#cgo LDFLAGS: -L/usr/local/lib -lrocketmq
+#include "rocketmq/CMessageExt.h"
+#include "rocketmq/CPushConsumer.h"
+*/
+import "C"
 import (
-    "fmt"
-    "testing"
-    "../client"
+       "sync"
 )
 
-func TestGetMessageTopic(test *testing.T){
-    fmt.Println("-----TestGetMessageTopic Start----")
-    msg := client.CreateMessage("testTopic")
-    client.DestroyMessage(msg)
-    fmt.Println("-----TestGetMessageTopic Finish----")
+var pushConsumerMap sync.Map
+
+//export consumeMessageCallback
+func consumeMessageCallback(cconsumer *C.CPushConsumer, msg *C.CMessageExt) 
C.int {
+       consumer, exist := pushConsumerMap.Load(cconsumer)
+       if !exist {
+               return C.int(ReConsumeLater)
+       }
+
+       msgExt := cmsgExtToGo(msg)
+       cfunc, exist := 
consumer.(*defaultPushConsumer).funcsMap.Load(msgExt.Topic)
+       if !exist {
+               return C.int(ReConsumeLater)
 
 Review comment:
   it will be implement asap.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to