thetumbled commented on PR #18679: URL: https://github.com/apache/pulsar/pull/18679#issuecomment-1331621176
> If hasMessageAvailable() returns true, it means we have messages in the topic. But the readNext can be blocked for waiting for the broker to dispatch messages to the client. But it should not be blocked forever. > > How closing the consumer will help with this situation? Since `reader.hasMessageAvailable` do not guarantee that a subsequent call to `readNext()` will not block, there may be situation that there is no any message to be read in the topic. we should not block forever to read messages from the snapshot topic, and the latest snapshot is not indispensable. we could still use an older snapshot to rebuild transaction buffer. -- 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]
