# Transport client - node.name

**URL:** https://discuss.elastic.co/t/transport-client-node-name/73582
**Category:** Elasticsearch
**Created:** [February 1, 2017, 7:54pm UTC](https://discuss.elastic.co/t/transport-client-node-name/73582 "2017-02-01T19:54:51Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Sree2k](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@Sree2k](https://discuss.elastic.co/u/Sree2k)
#### Post date: [February 1, 2017, 7:54pm UTC](https://discuss.elastic.co/t/transport-client-node-name/73582/1 "2017-02-01T19:54:51Z")

</div>

Hello,

In the transport client settings builder, I'm currently using [node.name](http://node.name) along with hosts. My settings builder looks like,

Settings.builder().put("[cluster.name](http://cluster.name)", "abc").put("[node.name](http://node.name)", "node1").put("client.transport.sniff", true);  
..  
client.addTransportAddress(....)  
..  
here ^, is [node.name](http://node.name) a mandatory field? I have seen some examples which includes [node.name](http://node.name) and some examples which doesn't include. Its not very clear from documentation. What happens when we leave [node.name](http://node.name) in the settings ?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [February 1, 2017, 8:52pm UTC](https://discuss.elastic.co/t/transport-client-node-name/73582/2 "2017-02-01T20:52:59Z")

</div>

It does not make sense to add a node name to something which is not a node but a client.

You don't have to set that.

---

<div class="post-metadata">

### Author: ![Sree2k](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@Sree2k](https://discuss.elastic.co/u/Sree2k)
#### Post date: [February 1, 2017, 9:38pm UTC](https://discuss.elastic.co/t/transport-client-node-name/73582/3 "2017-02-01T21:38:16Z")

</div>

Yes, makes sense.

I have a cluster with master and data nodes. I connect to the cluster from my app. I don't think have [node.name](http://node.name) in the client would matter.

Do you know why certain examples have this field set ? Just trying to understand, what's the need to have this setting or when this will be useful.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [February 1, 2017, 9:55pm UTC](https://discuss.elastic.co/t/transport-client-node-name/73582/4 "2017-02-01T21:55:58Z")

</div>

I believe examples were using a Node Client (which should not be used) instead of a Transport Client.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 1, 2017, 9:56pm UTC](https://discuss.elastic.co/t/transport-client-node-name/73582/5 "2017-03-01T21:56:01Z")

</div>

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