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 2022/08/04 10:04:07 UTC

[GitHub] [rocketmq-client-go] lampnick opened a new issue, #884: Push Consumer goroutine leak.

lampnick opened a new issue, #884:
URL: https://github.com/apache/rocketmq-client-go/issues/884

   The issue tracker is **ONLY** used for the go client (feature request of RocketMQ need to follow [RIP process](https://github.com/apache/rocketmq/wiki/RocketMQ-Improvement-Proposal)). Keep in mind, please check whether there is an existing same report before your raise a new one.
   
   Alternately (especially if your communication is not a bug report), you can send mail to our [mailing lists](http://rocketmq.apache.org/about/contact/). We welcome any friendly suggestions, bug fixes, collaboration, and other improvements.
   
   Please ensure that your bug report is clear and that it is complete. Otherwise, we may be unable to understand it or to reproduce it, either of which would prevent us from fixing the bug. We strongly recommend the report(bug report or feature request) could include some hints as to the following:
   
   **BUG REPORT**  
   1. Please describe the issue you observed:
   
   ```
   for i := 0; i <= 100; i++ {
   		opts := []consumer.Option{
   			consumer.WithGroupName(normalGroup),
   			consumer.WithInstance(namespace),
   			consumer.WithMaxReconsumeTimes(5),               //消息最大重试消费次数
   			consumer.WithPullBatchSize(1),                   //批量拉取时最大拉取数
   			consumer.WithConsumeMessageBatchMaxSize(int(1)), //批量消费最大推送数量
   			consumer.WithNamespace(namespace),
   			consumer.WithNsResolver(primitive.NewPassthroughResolver([]string{tcpEp})),
   			consumer.WithCredentials(primitive.Credentials{
   				AccessKey: accessKey,
   				SecretKey: secretKey,
   			}),
   		}
   
   		c, err := rocketMQ.NewPushConsumer(
   			opts...,
   		)
   		if err != nil {
   			log.Fatalln("rocketMQ.NewPushConsumer err: ", err)
   		}
   
   		selector := consumer.MessageSelector{Type: consumer.TAG, Expression: normalTag}
   		if err = c.Subscribe(topic, selector, normalMsgHandler()); err != nil {
   			log.Fatalln("rocketMQ.Subscribe err: ", err)
   		}
   
   		if err = c.Start(); err != nil {
   			log.Println("rocketMQ.Start err: ", err)
   			continue
   		}
   		if err = c.Shutdown(); err != nil {
   			log.Fatalln("rocketMQ.Shutdown err: ", err)
   		}
   	}
   ```
   using pprof can see the leak of goroutine.
   ```
   101 @ 0x103c505 0x104d357 0x138e43a 0x1072721
   #	0x138e439	git.myscrm.cn/golang/rocketmq-client-go/v2/consumer.(*pushConsumer).Start.func1.1+0xd9	/Users/nick/gomod/test/vendor/git.myscrm.cn/golang/rocketmq-client-go/v2/consumer/push_consumer.go:154
   
   ```
   2. Please tell us about your environment:
   
        - What is your OS?
   mac
        - What is your client version?
   v2.1.0
        - What is your RocketMQ version?
   
   3. Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):
   
   **FEATURE REQUEST**
   
   1. Please describe the feature you are requesting.
   
   2. Provide any additional detail on your proposed use case for this feature.
   
   2. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?
   
   4. If there are some sub-tasks using -[] for each subtask and create a corresponding issue to map to the sub task:
   
       - [sub-task1-issue-number](example_sub_issue1_link_here): sub-task1 description here, 
       - [sub-task2-issue-number](example_sub_issue2_link_here): sub-task2 description here,
       - ...
   


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

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-client-go] ShannonDing closed issue #884: Push Consumer goroutine leak.

Posted by GitBox <gi...@apache.org>.
ShannonDing closed issue #884: Push Consumer goroutine leak.
URL: https://github.com/apache/rocketmq-client-go/issues/884


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

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org