How to happen when connect one node in ES Cluster (3 nodes)

Hi all, My ES cluster has 3 nodes include 10.40.12.51, 10.40.12.52, 10.40.12.53 by TCP transport.
if I only connect to node 10.40.12.51 (no connect 10.40.12.52, 10.40.12.53 ) the sample code

Settings settings = Settings.builder()
       .put("cluster.name","ES_cluster")
       .put("client.transport.ignore_cluster_name",true)
       .put("client.transport.sniff", true)
       .build();
    TransportClient client = new PreBuiltTransportClient(settings);
    client.addTransportAddr
               ess(new InetSocketTransportAddress(InetAddress.getByName(10.40.12.51),"9300"));
    }

When nodes 10.40.12.51 shutdown, Do TransportClient client auto move connects to node 10.40.12.52 or 10.40.12.53 ?
Thanks all

Please could you try and format your post a bit better, using the </> button for code. It's quite hard to read when it looks like the post above, and this makes it much less likely to receive an answer.

I do not completely understand the question, but I think you are asking how to tell the client to connect to multiple transport addresses. If so, I think the answer is to call addTransportAddress multiple times.

(Also, sorry to nitpick, but the greeting "Hi guys" doesn't greet those of us that aren't guys; I suggest saying something like "Hi all" if you want, although no such greeting is really necessary here).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.