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/09/24 09:40:42 UTC

[GitHub] [rocketmq-client-go] happyxhw edited a comment on issue #537: Is there any way to unsubscribe ?

happyxhw edited a comment on issue #537:
URL: https://github.com/apache/rocketmq-client-go/issues/537#issuecomment-698233461


   shutdown the consumer,, then the producer can not push anymore
   ```
   p, err := rocketmq.NewProducer(
   		producer.WithNameServer(primitive.NamesrvAddr{endpoint}),
   		producer.WithRetry(3),
   		producer.WithGroupName(group),
   	)
   	if err != nil {
   		log.Fatal("start producer err", zap.Error(err))
   	}
   	err = p.Start()
   	if err != nil {
   		log.Fatal("start producer err", zap.Error(err))
   	}
   	for i := 0; i < 10000; i++ {
   		err := p.SendOneWay(context.Background(), &primitive.Message{
   			Topic: topic,
   			Body:  []byte("Hello RocketMQ Go Client!"),
   		})
   		if err != nil {
   			log.Error("push err", zap.Error(err))
   		}
   		time.Sleep(time.Second * 1)
   	}
   ```
   shutdown consumer push err:
   ```
   "service close is not running, please check"
   ```


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