Barrett-M82A1 opened a new issue #539:
URL: https://github.com/apache/rocketmq-client-go/issues/539
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
}
```


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