# One Tcp port with multiple sources

**URL:** <https://discuss.elastic.co/t/one-tcp-port-with-multiple-sources/159853>\
**Category:** Logstash\
**Created:** [December 7, 2018, 6:23am UTC](https://discuss.elastic.co/t/one-tcp-port-with-multiple-sources/159853 "2018-12-07T06:23:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shwesinhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shwesinhan/32/78663_2.png) [@shwesinhan](https://discuss.elastic.co/u/shwesinhan)\
**Post date:** [December 7, 2018, 6:23am UTC](https://discuss.elastic.co/t/one-tcp-port-with-multiple-sources/159853/1 "2018-12-07T06:23:07Z")

</div>

hi community

I use tcp input plugin to get streaming data in logstash.  
I identify different sources by port.  
eg:

> tcp {  
> port =\> 5513   
> add\_field =\> { "source\_type" =\> "SourceA" }   
> }  
> tcp {  
> port =\> 5512   
> add\_field =\> { "source\_type" =\> "SourceB" }   
> }  
> tcp {  
> port =\> 5511   
> add\_field =\> { "source\_type" =\> "SourceC" }   
> }

Now I want to use `one tcp port` but still want to `identify` SourceA/ SourceB/ SourceC at input part.  
Is that possible? Plz guide to me how to do that using tcp plugin?  
OR plz advise which input plugin is suitable for streaming instead of tcp??

Appreciate!

---

<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:** [January 4, 2019, 6:23am UTC](https://discuss.elastic.co/t/one-tcp-port-with-multiple-sources/159853/2 "2019-01-04T06:23:08Z")

</div>

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