Elasticsearch 5 TransportClient java api

TransportClient client = new PreBuiltTransportClient(Settings.EMPTY)
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("host1"), 9300))
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("host2"), 9300));

Whether it is necessary to include all the node IP suppose i have 3 nodes one data , client , master nodes or enough to include only the data/client node IP.

You might be interested to read about the sniffing option of the transport client, which allows it to discover other nodes of the cluster. https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/transport-client.html

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