ElasticSearch Connection Using Transport Client java API in ES 5

Kindly suggest whether is it necessary to include all the IP of elasticsearch node which can master/data/client node.

Is it enough to include the client node ip alone to communicate with the other nodes using transport client java api in Elasticsearch 5

See the "sniffing" behaviour described in detail here: https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/transport-client.html

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

Is it necessary to include all the 3 IP using .addTransportAddres or enough to include only the data node IP.

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