BewareMyPower opened a new issue, #23350: URL: https://github.com/apache/pulsar/issues/23350
### Search before asking - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar. ### Motivation When I'm working on https://github.com/apache/pulsar/pull/23349, I realized that the built-in client should be closed before the load manager. Pulsar provides a built-in client via `PulsarService#getClient()`, which is public and can be used in plugins. It's also used in the built-in topic policies service `SystemTopicBasedTopicPoliciesService`. Currently, the built-in client was closed after the load manager's close. If there is a pending producer or reader creation from this client, lookup requests will be sent to the load manager, which could fail and the client could retry forever. For asynchronous creations, there is no way to interrupt them. For example, ```java // there is no way to interrupt the createAsync() call final var future = pulsarClient.newProducer().createAsync(); ```` The only solution is to close the client. However, since the extensible load manager also uses this client, it would make extensible load manager's cleanup work fail. ### Solution Create a independent Pulsar client for extensible load manager. ### Alternatives _No response_ ### Anything else? _No response_ ### Are you willing to submit a PR? - [X] I'm willing to submit a PR! -- 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]
