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/07/07 05:36:12 UTC

[GitHub] [pulsar-client-go] cckellogg commented on pull request #303: Close msg channel when consumer close

cckellogg commented on pull request #303:
URL: https://github.com/apache/pulsar-client-go/pull/303#issuecomment-654613386


   Looking at the code example reading messages from the channel after the consumer has unsubscribed or closed is kind of useless since you can't acknowledge those messages and they will be resent when the client connects again. I personally think it's better to have your own close flag to know when you should stop processing messages. 
   
   Closing the message channel in the client is a little tricky since multiple go routines could be sending on it and the multi topic and regex consumer are built on the base consumer. There would probably need to be some sort of flag/lock to know when and who should close the message 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.

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