Logstash issue with duplicates of logs

Hello,
I have a simple logstash.conf file that looks something like this. When using Filebeat, it remembered which logs were sent to Elasticsearch. How can I implement a similar solution for Logstash? Currently, it's sending duplicate logs.

input {
  file {
    path => "/home/user/test.json"
    start_position => "beginning"
    sincedb_path => "/var/lib/logstash/sincedb"
    mode => "read"
    codec => "json"
  }
}


 output {
  elasticsearch {
    hosts => ["https://10.10.10.10:9200"]
    ssl => true
    ssl_certificate_verification => false
    index => "test-%{+yyyy.MM.dd}"
    user => "${ELASTIC_USER}"
    password => "${ELASTIC_PASSWORD}

  }
  stdout {
    codec => rubydebug
  }
}