315157973 commented on pull request #10190: URL: https://github.com/apache/pulsar/pull/10190#issuecomment-822341543
I tried to handle this situation in connectionOpen, but failed: 1 The first time call hasMessageAvailable, it will get the last msg in broker, and then trigger seek lastMsgIdInBroker 2 seek will trigger disconnect and reconnect, clearReceiverQueue() will be called when connectionOpen, and then startMessageId will be assigned to seekId (lastMsgIdInBroker) 3 Then connection is disconnected again(For other unknown reasons), and the startMessageId subscribed at this time is lastMsgIdInBroker, and the broker will not return this message. Because the sub command does not have an inclusive option, it can only be read from the next item of startMessageId. And I can't set entryId or ledger -1, otherwise the client may read forward after multiple reconnections. Unless I change the proto, add the inclusive option. @codelipenghui -- 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: us...@infra.apache.org