# Using Java\_line codec on Kafka input

**URL:** <https://discuss.elastic.co/t/using-java-line-codec-on-kafka-input/250224>\
**Category:** Logstash\
**Created:** [September 28, 2020, 3:39pm UTC](https://discuss.elastic.co/t/using-java-line-codec-on-kafka-input/250224 "2020-09-28T15:39:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kbrisso](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kbrisso](https://discuss.elastic.co/u/kbrisso)\
**Post date:** [September 28, 2020, 3:39pm UTC](https://discuss.elastic.co/t/using-java-line-codec-on-kafka-input/250224/1 "2020-09-28T15:39:03Z")

</div>

Hello-

Would this be a valid way to configure the java\_line codec for the Kafka input? I need to parse events with a custom line terminator like below. Currently I have \n in my debug statements and \n for line terminators in my app that uses log4j. I want each event to parse on "\n\*\*ENDLINE\n"

```auto
input {
          kafka {
            bootstrap_servers => "10.65.xx.xx:9091,10.65.xx.xx:9091,10.65.xx.xx:9091"
            topics => "ztta-qa3"
            consumer_threads => 4
            codec => java_line { 
                  charset => "utf-8" 
                  delimiter =>"\n**ENDLINE\n"
            }
            group_id => "test-consumer-group"
# security_protocol => "SSL"
}

```

Thanks,  
Kevin

---

<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:** [October 26, 2020, 3:39pm UTC](https://discuss.elastic.co/t/using-java-line-codec-on-kafka-input/250224/2 "2020-10-26T15:39:21Z")

</div>

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