lhotari commented on a change in pull request #14078:
URL: https://github.com/apache/pulsar/pull/14078#discussion_r795930722
##########
File path:
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java
##########
@@ -481,6 +504,30 @@ public HAProxyMessage getHAProxyMessage() {
return haProxyMessage;
}
- private static final Logger LOG =
LoggerFactory.getLogger(ProxyConnection.class);
+ private boolean isBrokerActive(String targetBrokerHostPort) {
+ for (ServiceLookupData serviceLookupData : getAvailableBrokers()) {
+ if (matchesHostAndPort("pulsar://",
serviceLookupData.getPulsarServiceUrl(), targetBrokerHostPort)
+ || matchesHostAndPort("pulsar+ssl://",
serviceLookupData.getPulsarServiceUrlTls(),
+ targetBrokerHostPort)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private List<? extends ServiceLookupData> getAvailableBrokers() {
+ try {
+ return service.getDiscoveryProvider().getAvailableBrokers();
Review comment:
Wouldn't the possible instability issues also impact the brokers? What
is the instability that you are referring to?
btw. The [DataStax Pulsar Helm Chart configures `zookeeperServers` and
`configurationStoreServers` in the
Proxy](https://github.com/datastax/pulsar-helm-chart/blob/524d796b06e7d737f60fc4a503aa56cd478dbe7f/helm-chart-sources/pulsar/templates/proxy/proxy-configmap.yaml#L45-L72)
and there haven't been any reports of any issues caused by the configuration.
--
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]