poorbarcode opened a new pull request, #23556:
URL: https://github.com/apache/pulsar/pull/23556
### Motivation
If the user deploys a cluster with proxy, and network topology like this:
Client -> Proxy(with TLS) -> Broker(without TLS)
When the user calls `pulsar-admin topics lookup <topic name>`, the user will
get a `null` response.
But the exact value that the broker responded to is below:
```json
{
"brokerUrl": "pulsar://broker-1.com:6650",
"httpUrl": "http://broker-1.com:8080",
"brokerUrlSsl": ""
}
```
It is caused by the pulsar-admin client's issue:
https://github.com/apache/pulsar/blob/master/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/LookupImpl.java#L60
```java
if (client.useTls) {
return response.brokerUrlSsl; // even if it is null
}
```
### Modifications
- fix the issue
- the test is hard to write, so I skipped to write a test
### 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: x
--
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]