fumenglin opened a new issue #666:
URL: https://github.com/apache/rocketmq-client-go/issues/666


   核心代码如下:
   traceCfg := &primitive.TraceConfig{
                Access:   primitive.Local,
                Resolver: primitive.NewPassthroughResolver(addrs),
        }
        TopicConsumer := "topic"
        ConsumerGroupName := "consumer"
        c, _ := rocketmq.NewPushConsumer(
                consumer.WithGroupName(ConsumerGroupName),
                
consumer.WithNsResovler(primitive.NewPassthroughResolver(addrs)),
                consumer.WithTrace(traceCfg),
        )
        err := c.Subscribe(TopicConsumer, consumer.MessageSelector{}, func(ctx 
context.Context,
                msgs ...*primitive.MessageExt) (consumer.ConsumeResult, error) {
                for i := range msgs {
                                        waybillMsg := msgs[i]
                                        t.Log(waybillMsg.OffsetMsgId)
                                        t.Log(string(waybillMsg.Body))
                                }
                return consumer.ConsumeSuccess, nil
        })
        if err != nil {
                fmt.Println(err.Error())
        }
        // Note: start after subscribe
        err = c.Start()
        if err != nil {
                fmt.Println(err.Error())
   
        }
        time.Sleep(time.Hour)
        err = c.Shutdown()
        if err != nil {
                fmt.Printf("shutdown Consumer error: %s", err.Error())
        }
   
   但是在监控端;显示的:tackType = UNKNOWN ;result=com.alibaba.fastjson.JSONException: No 
enum constant org.apache.rocketmq.remoting.protocol.LanguageCode.GO, 
com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:614)
   
   请问是trace用的不对么;


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to