3pacccccc opened a new pull request, #24893:
URL: https://github.com/apache/pulsar/pull/24893

   Main Issue: https://github.com/apache/pulsar/issues/24796
   
   ### Motivation
   When creating multiple PulsarAdmin clients in the same JVM, each client 
currently creates its own set of resources (event loops, timers, DNS 
resolvers). This leads to excessive thread consumption and memory usage when 
many admin clients are instantiated.
   
   This change allows PulsarAdmin clients to share resources through the 
`PulsarClientSharedResources` mechanism, similar to what's already available 
for  PulsarClient.
   
   ### Modifications
   1. Added `sharedResources(PulsarClientSharedResources)` method to 
`PulsarAdminBuilder` API
   2. Modified `PulsarAdminBuilderImpl` to accept and propagate shared 
resources configuration
   3. Updated `PulsarAdminImpl` constructor to pass shared resources to HTTP 
connector
   4. Enhanced `AsyncHttpConnector` to utilize shared resources:
      - Event loop group for I/O operations
      - Netty timer for timeouts and scheduling
      - DNS resolver for name resolution
   5. Added test to verify shared resources are properly reused across multiple 
admin clients.
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   ### Does this pull request potentially affect one of the following parts:
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [x] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   
   ### 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: https://github.com/3pacccccc/pulsar/pull/29
   


-- 
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]

Reply via email to