Log lines appearing twice

Hello

I'm shipping json logs to Logstash and have used below config:

input {

beats {
port => 5044
}
beats {
port => 5045

}
}
filter{
if ([fields][app] == "abc") {
json {
source => "message"
}
split {
field => "message"
}
}
}
output {
elasticsearch {
hosts => "localhost:9200"
}
}

=======================
This is resulting in log lines to be appearing twice. Can someone please help me. I have tried few things that did not work out, like using mutate to remove the message field.

Thanks

You are using a split filter, so you should expect multiple events for each input line. What does the input event look like?

Input is log lines in json format. Is the filter incorrect?

Can I please get an answer on how to fix this please

I have removed the split filter but still see multiple lines. Can someone please help me with a fix for this.