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

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

Settings settings = Settings.builder()
       .put("client.transport.sniff", true)
    TransportClient client = new PreBuiltTransportClient(settings);
               ess(new InetSocketTransportAddress(InetAddress.getByName(,"9300"));

When nodes shutdown, Do TransportClient client auto move connects to node or ?
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.