yyj8 opened a new issue, #22134: URL: https://github.com/apache/pulsar/issues/22134
### Search before asking - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar. ### Motivation he current Java client implementation has certain flaws in automatic fault switching. org.apache.pulsar.client.impl.AutoClusterFailover.java boolean probeAvailable(String url) { try { resolver.updateServiceUrl(url); InetSocketAddress endpoint = resolver.resolveHost(); Socket socket = new Socket(); socket.connect(new InetSocketAddress(endpoint.getHostName(), endpoint.getPort()), TIMEOUT); socket.close(); return true } catch (Exception e) { log.warn("Failed to probe available, url: {}", url, e); return false; } } The client only establishes a TCP connection with the exposed connection address of the cluster to determine whether the cluster is available, which cannot adapt to scenarios where the cluster is partially unavailable (half dead). In this scenario, we hope to make corresponding fault switching judgments by initiating cluster health status requests to the cluster. Then within the cluster, we provide an admin management command to update the cluster's health status. To avoid this scenario, all businesses that need to connect to this cluster need to manually switch cluster connection addresses and restart applications, resulting in inconsistent link data among multiple business team due to inconsistent operation steps. ### Solution _No response_ ### Alternatives _No response_ ### Anything else? _No response_ ### Are you willing to submit a PR? - [X] I'm willing to submit a PR! -- 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]
