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 2020/10/12 05:08:23 UTC

[GitHub] [rocketmq] Barrett-M82A1 opened a new issue #2347: SDK V2 cannot consumption message,trackType is UNKNONW

Barrett-M82A1 opened a new issue #2347:
URL: https://github.com/apache/rocketmq/issues/2347


   RocketMQ version is 4.7.0
   SDK "github.com/apache/rocketmq-client-go/v2/consumer"
   
   main.go
   ```
   func main() {
   	c, _ := rocketmq.NewPushConsumer(
   		consumer.WithGroupName("local-node-1"),
   		consumer.WithNsResovler(primitive.NewPassthroughResolver([]string{"192.168.1.220:9876"})),
   	)
   	err := c.Subscribe("SendMessage", consumer.MessageSelector{},increment.Consumer)
   	if err != nil {
   		fmt.Println(err.Error())
   	}
   	// Note: start after subscribe
   	err = c.Start()
   	if err != nil {
   		fmt.Println(err.Error())
   		os.Exit(-1)
   	}
   	time.Sleep(time.Hour)
   	err = c.Shutdown()
   	if err != nil {
   		fmt.Printf("shutdown Consumer error: %s", err.Error())
   	}
   }
   ```
   consumer.go
   ```
   func Consumer(ctx context.Context, msgs ...*primitive.MessageExt) (consumer.ConsumeResult, error) {
   	for i := range msgs {
   		fmt.Printf("subscribe callback: %v \n", msgs[i])
   	}
   
   	return consumer.ConsumeSuccess, nil
   }
   ```
   
   ![截图录屏_选择区域_20200927170731](https://user-images.githubusercontent.com/27344136/94361034-074d9300-00e4-11eb-8f3b-f61b89a2b183.png)
   ![截图录屏_选择区域_20200927170615](https://user-images.githubusercontent.com/27344136/94361041-17657280-00e4-11eb-9a31-8ca2dd4d341f.png)
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [rocketmq] RongtongJin closed issue #2347: SDK V2 cannot consumption message,trackType is UNKNONW

Posted by GitBox <gi...@apache.org>.
RongtongJin closed issue #2347:
URL: https://github.com/apache/rocketmq/issues/2347


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [rocketmq] RongtongJin commented on issue #2347: SDK V2 cannot consumption message,trackType is UNKNONW

Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #2347:
URL: https://github.com/apache/rocketmq/issues/2347#issuecomment-711235579


   Go language client is not supported by console.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [rocketmq] vongosling commented on issue #2347: SDK V2 cannot consumption message,trackType is UNKNONW

Posted by GitBox <gi...@apache.org>.
vongosling commented on issue #2347:
URL: https://github.com/apache/rocketmq/issues/2347#issuecomment-711452413


   You could pr for go support. will you?


----------------------------------------------------------------
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:
users@infra.apache.org