nodece opened a new pull request, #24175:
URL: https://github.com/apache/pulsar/pull/24175

   ### Motivation
   
   When a consumer or producer connects to the broker via Pulsar Proxy, it sets 
the `X-Pulsar-Client-IP` header to indicate the real client IP.  
   To avoid overwriting this user-defined value, the local address should only 
be added to the metadata if the header is missing.  
   This ensures that `admin.topics().stats()` returns the correct address.
   
   ### Modifications
   
   - Use `putIfAbsent` instead of `put` to avoid overwriting X-Pulsar-Client-IP 
in the metadata.
   - Added a test to cover this behavior.
   
   ### 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 -->


-- 
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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to