poorbarcode opened a new pull request, #20573: URL: https://github.com/apache/pulsar/pull/20573
### Motivation There may leave an orphan consumer after the `ServerCnx` closed, which would cause consumption to get stuck. For example: | time | `add a new consumer` | `Connection closed by inactive event` | | --- | --- | --- | | 1 | | Push a task typed `connection inactive` into the `eventLoop` | | 2 | Push a task typed `cmd subscribe` into the `eventLoop` | | 3 | | connection inactive | | 4 | | Close all consumers bound to this connection | | 5 | Register new consumers into the subscription | | 6 | send messages to this consumer(the send will fail, but no warn log<sup>[1]</sup>) | | 7 | These messages can not be delivered until the topic is unloaded | ### Modifications add a checker `connection.isAtive` after the consumer created complete. ### Documentation <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. --> - [ ] `doc` <!-- Your PR contains doc changes. --> - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later --> - [x] `doc-not-needed` <!-- Your PR changes do not impact docs --> - [ ] `doc-complete` <!-- Docs have been already added --> ### Matching PR in forked repository PR in forked repository: x -- 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]
