crossoverJie commented on issue #1421: URL: https://github.com/apache/pulsar-client-go/issues/1421#issuecomment-3460168558
> But I'm not sure what will happen if the consumer call Receive() after topic unload, at this time will both two permits work and save two messages in the pending queue? If zero queue consumer is enabled, the internal channel will be an unbuffered queue with no size, so there will never be two messages in it. I've already submitted a [unit test](https://github.com/apache/pulsar-client-go/pull/1434) to cover this scenario. Similar to how a user repeatedly calls the Receive(`Receive(context.Context)`) function to retrieve messages, subsequent calls will also block until new messges arrives. However, this can indeed be optimized by referring to the Java client. Pull requests are welcome. -- 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]
