BewareMyPower opened a new pull request, #19874: URL: https://github.com/apache/pulsar/pull/19874
### Motivation For a multi-topics consumer, when it acknowledges a single message, it will first find the owner topic from its message ID. If the owner topic is not subscribed by the consumer, `NotConnectedException` will be thrown. However, when it acknowledges multiple messages, if any of them is the message whose owner topic is not subscribed by the consumer, NPE will happen instead. ### Modifications When acknowledging multiple messages, ignore the message IDs whose owner topic is not subscribed. `testAckMessageInAnotherTopic` is added to cover this case. ### TODO There are many other places that do not check if `consumers.get` returns `null`, like `doReconsumeLater`, `negativeAcknowledge`, etc. This patch does not cover them. -- 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]
