# Logstash concatinates topics

**URL:** <https://discuss.elastic.co/t/logstash-concatinates-topics/290033>\
**Category:** Logstash\
**Created:** [November 24, 2021, 9:28am UTC](https://discuss.elastic.co/t/logstash-concatinates-topics/290033 "2021-11-24T09:28:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mamol27](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mamol27/32/82016_2.png) [@Mamol27](https://discuss.elastic.co/u/Mamol27)\
**Post date:** [November 24, 2021, 9:28am UTC](https://discuss.elastic.co/t/logstash-concatinates-topics/290033/1 "2021-11-24T09:28:56Z")

</div>

Hi! I have pipeline kafka→logstash→Elasticsearch  
I created two topics in kafka: test-1 and test-2  
Write manually to these topics messages: 67 into test-1 and 67 into test-2.  
I wrote two logstash workers

test1.conf

```auto
input {
    kafka {
        bootstrap_servers => "172.29.39.115:9093,172.29.39.116:9093"
        topics => "test-1"
        #consumer_threads => 2
        client_id => "logstash-test-1"
        group_id => "logstash-test-1-0"
        security_protocol => "SSL"
        ssl_keystore_location => "/opt/logstash/config/server.keystore.p12"
        ssl_keystore_password => "passwd"
        ssl_truststore_location => "/opt/logstash/config/truststore.jks"
        ssl_truststore_password => "passwd"
        #ssl_endpoint_identification_algorithm => ""
    }
}
output {
    elasticsearch {
        hosts => ["172.29.39.141:9200", "172.29.39.142:9200", "172.29.39.143:9200", "172.29.39.144:9200"]
        ssl => true
        cacert => "/etc/certificates/salt-ca.crt"
        user => logstash_internal
        password => "passwd"
        index => "test-1"
    }
}

```

test2.conf

```auto
input {
    kafka {
        bootstrap_servers => "172.29.39.115:9093,172.29.39.116:9093"
        topics => "test-2"
        #consumer_threads => 2
        client_id => "logstash-test-2"
        group_id => "logstash-test-2-0"
        security_protocol => "SSL"
        ssl_keystore_location => "/opt/logstash/config/server.keystore.p12"
        ssl_keystore_password => "passwd"
        ssl_truststore_location => "/opt/logstash/config/truststore.jks"
        ssl_truststore_password => "passwd"
        #ssl_endpoint_identification_algorithm => ""
    }
}
output {
    elasticsearch {
        hosts => ["172.29.39.141:9200", "172.29.39.142:9200", "172.29.39.143:9200", "172.29.39.144:9200"]
        ssl => true
        cacert => "/etc/certificates/salt-ca.crt"
        user => logstash_internal
        password => "passwd"
        index => "test-2"
    }
}

```

I thought that I will have two indices in Elasticsearch, test-1 with 67 docs and test-2 with 60 docs, but I have test-1 with 127 docs and test-2 with 127 docs.

What I doing wrong?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [November 24, 2021, 5:38pm UTC](https://discuss.elastic.co/t/logstash-concatinates-topics/290033/2 "2021-11-24T17:38:09Z")

</div>

> [@Mamol27](#):
>
> What I doing wrong?

See [this](https://discuss.elastic.co/t/duplicated-log/269931/4) answer.

---

<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:** [December 22, 2021, 5:39pm UTC](https://discuss.elastic.co/t/logstash-concatinates-topics/290033/3 "2021-12-22T17:39:00Z")

</div>

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