You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/11/10 05:36:36 UTC

[GitHub] [pulsar-client-go] cocotyty opened a new issue #387: Close consumer message channel when consumer closed.

cocotyty opened a new issue #387:
URL: https://github.com/apache/pulsar-client-go/issues/387


   **Is your feature request related to a problem? Please describe.**
   A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
   
   lots of consumer code maybe like this:
   
   ```go
   for msg := range consumer.Chan(){
      // consume msg
   }
   ``` 
   if not close channel when consumer close, maybe cause goroutine leak.
   
   **Describe the solution you'd like**
   A clear and concise description of what you want to happen.
   when close a consumer,close the consumer's message channel.
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative solutions or features you've considered.
   
   **Additional context**
   Add any other context or screenshots about the feature request 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.

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



[GitHub] [pulsar-client-go] isalb729 commented on issue #387: Close consumer message channel when consumer closed.

Posted by GitBox <gi...@apache.org>.
isalb729 commented on issue #387:
URL: https://github.com/apache/pulsar-client-go/issues/387#issuecomment-1000466928


   Just met the same issue. This method would be more useful if you can close the channel.


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar-client-go] gonejack commented on issue #387: Close consumer message channel when consumer closed.

Posted by GitBox <gi...@apache.org>.
gonejack commented on issue #387:
URL: https://github.com/apache/pulsar-client-go/issues/387#issuecomment-752379629


   Hello, is this a bug or expected behaviour?


----------------------------------------------------------------
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] [pulsar-client-go] omnilight commented on issue #387: Close consumer message channel when consumer closed.

Posted by GitBox <gi...@apache.org>.
omnilight commented on issue #387:
URL: https://github.com/apache/pulsar-client-go/issues/387#issuecomment-785006719


   Hello, I've also interested in this issue. 
   
   Currently it is impossible to detect if consumer closed if you are not using `consumer.Receive()` method. But this method is blocking and is intended to be used as a receiver of the message. 
   
   Maybe we can either add method like `Closed()` to the interface, or change `Receive()` method as proposed by issue author?


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