# How many Transport Clients do I need in one Java application?

**URL:** <https://discuss.elastic.co/t/how-many-transport-clients-do-i-need-in-one-java-application/46489>\
**Category:** Elasticsearch\
**Created:** [April 6, 2016, 7:50am UTC](https://discuss.elastic.co/t/how-many-transport-clients-do-i-need-in-one-java-application/46489 "2016-04-06T07:50:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![whzcl](https://avatars.discourse-cdn.com/v4/letter/w/eb8c5e/32.png) [@whzcl](https://discuss.elastic.co/u/whzcl)\
**Post date:** [April 6, 2016, 9:57am UTC](https://discuss.elastic.co/t/how-many-transport-clients-do-i-need-in-one-java-application/46489/2 "2016-04-06T09:57:35Z")

</div>

From this link, I have known that we should have only one transportClient in our application!

> [@Transport Client in ES](https://discuss.elastic.co/t/transport-client-in-es/44110):
>
> Hi, We have an requirement where we have to use the delete by query plugin. As per new ES version 2.x the delete by query is used as an plugin through Transport client as shown below: private TransportClient dc1Client = null; this.dc1Client=TransportClient.builder().settings(settings).addPlugin(DeleteByQueryPlugin.class).build(); We have been using same transport client for indexing and searching. But adding the delete plugin will make it heavy while performing search and index operations. …

---

_[View the full topic](https://discuss.elastic.co/t/how-many-transport-clients-do-i-need-in-one-java-application/46489)._
