Logstash TCP input not being processed?

Hi there,
I have a very simple pipeline in logstash:

input {
    tcp {
        port => 4560
		codec => json_lines
    }
}


output {
	stdout {
       codec => rubydebug
    }
}

I am sending JSON lines to Logstash from a Java application using a Logstash Appender/Encoder (GitHub - logfellow/logstash-logback-encoder: Logback JSON encoder and appenders)

The JSON lines being sent are like the following:

{"app_name":"myapp","app_version":"1.0.0","hostname":"myhostname","@timestamp":"2024-10-31T11:40:53.5018744+01:00","message":"My message","thread_name":"main","level":"DEBUG","caller_class_name":"com.test.LoggingTest","caller_method_name":"testLogMessage","caller_file_name":"LoggingTest.java","caller_line_number":16}

Note that each line does not terminate with a newline (\n) char and I think there's no way to make the Logback Appender/Encoder add it.

At the moment Logstash is not outputting anything to stdout, though I can see that the pipeline log moves after each log message being sent via TCP.
Is there any chance to make it work?
I need to output to Elasticsearch but first I wanted to be sure it can process the input correctly.

thanks for any help!
Paolo

Never use a json_lines codec on a line oriented input. The codec will accumulate data until a newline shows up, but the input consumes the newlines as delimiters, so they are never passed to the codec. Change this to a json codec.

thank you @Badger! Can't believe it was that simple! :grinning: