# How do I configure PreBuiltTransportClient to use Multithreading?

**URL:** <https://discuss.elastic.co/t/how-do-i-configure-prebuilttransportclient-to-use-multithreading/104868>\
**Category:** Elasticsearch\
**Created:** [October 23, 2017, 8:52am UTC](https://discuss.elastic.co/t/how-do-i-configure-prebuilttransportclient-to-use-multithreading/104868 "2017-10-23T08:52:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Cheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christopher_cheng/32/117417_2.png) [@Christopher\_Cheng](https://discuss.elastic.co/u/Christopher_Cheng)\
**Post date:** [October 23, 2017, 8:52am UTC](https://discuss.elastic.co/t/how-do-i-configure-prebuilttransportclient-to-use-multithreading/104868/1 "2017-10-23T08:52:32Z")

</div>

I am using the latest HighLevelClient to connect to ES 5.6. How do I configure it to use multithreading and configure number of threads to use?

```
client = new PreBuiltTransportClient(Settings.EMPTY)
                    .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(transportAddress), 9300));
```

---

<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:** [November 20, 2017, 8:52am UTC](https://discuss.elastic.co/t/how-do-i-configure-prebuilttransportclient-to-use-multithreading/104868/2 "2017-11-20T08:52:47Z")

</div>

Closed on November 20, 2017, 8:52am UTC

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