You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "nodece (via GitHub)" <gi...@apache.org> on 2025/04/11 10:54:02 UTC
[PR] [fix][client] Set local address only if not present [pulsar]
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-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [fix][client] Set local address only if not present [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #24175:
URL: https://github.com/apache/pulsar/pull/24175#issuecomment-2796758264
I also added this comment: https://github.com/apache/pulsar/pull/23974#issuecomment-2796749156
--
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-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [fix][client] Set local address only if not present [pulsar]
Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece commented on PR #24175:
URL: https://github.com/apache/pulsar/pull/24175#issuecomment-2800630803
https://github.com/apache/pulsar/pull/24177 has been merged, so this PR is unless.
--
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-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [fix][client] Set local address only if not present [pulsar]
Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece closed pull request #24175: [fix][client] Set local address only if not present
URL: https://github.com/apache/pulsar/pull/24175
--
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-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [fix][client] Set local address only if not present [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #24175:
URL: https://github.com/apache/pulsar/pull/24175#issuecomment-2796848190
I have created a PR to revert #23974 in #24177.
--
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-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org