flowchartsman commented on a change in pull request #303:
URL: https://github.com/apache/pulsar-client-go/pull/303#discussion_r693023004



##########
File path: pulsar/consumer_impl.go
##########
@@ -374,6 +374,7 @@ func (c *consumer) Close() {
                }
                wg.Wait()
                close(c.closeCh)
+               close(c.messageCh)

Review comment:
       I just came across this issue, and allowing the user to pass in a 
message channel seems like a mistake to me, because it inverts control. If the 
user wants to multiplex messages from different consumers onto a channel they 
control, it should be up to them to handle that with a select clause, 
[runtime.Select](https://pkg.go.dev/reflect#Select), or a combination of 
concurrency primitives in their code.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to