RobertIndie commented on code in PR #303:
URL: https://github.com/apache/pulsar-client-go/pull/303#discussion_r1723102271
##########
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.
Yes, I agree that this is a bad idea for users to pass their message
channel. We should remove it in the Go client 1.0.0. This feature makes it
difficult to develop and fix the consumer.
--
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]