# Logstash - wrong codec in tcp input plugin?

**URL:** <https://discuss.elastic.co/t/logstash-wrong-codec-in-tcp-input-plugin/83364>\
**Category:** Logstash\
**Created:** [April 24, 2017, 7:01am UTC](https://discuss.elastic.co/t/logstash-wrong-codec-in-tcp-input-plugin/83364 "2017-04-24T07:01:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)\
**Post date:** [April 28, 2017, 3:06pm UTC](https://discuss.elastic.co/t/logstash-wrong-codec-in-tcp-input-plugin/83364/2 "2017-04-28T15:06:38Z")

</div>

This because the `#fix_streaming_codecs` changes it for `JSONLines` and `Lines`, see [https://github.com/elastic/logstash/blob/0d1011980efc2fdae9b8e8a261b8d04f6ff537de/logstash-core/lib/logstash/inputs/base.rb#L122-L135](https://github.com/elastic/logstash/blob/0d1011980efc2fdae9b8e8a261b8d04f6ff537de/logstash-core/lib/logstash/inputs/base.rb#L122-L135)

Because in this input we assume that an event is separated by a new line, if you were using the `plain` or the `json` codec, the plugin would never know when or where to split the events and will just keep buffering data. For the user experience we make the assumptions that your events will be split by `\n`, but you can change that behavior in both codec by configuring the `delimiter` option, see the [jsonlines documentation](https://www.elastic.co/guide/en/logstash/current/plugins-codecs-json_lines.html)

---

_[View the full topic](https://discuss.elastic.co/t/logstash-wrong-codec-in-tcp-input-plugin/83364)._
