# Logstash Kafka output: adds extra topics

**URL:** <https://discuss.elastic.co/t/logstash-kafka-output-adds-extra-topics/81618>\
**Category:** Logstash\
**Created:** [April 7, 2017, 2:00pm UTC](https://discuss.elastic.co/t/logstash-kafka-output-adds-extra-topics/81618 "2017-04-07T14:00:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoaquinS](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@JoaquinS](https://discuss.elastic.co/u/JoaquinS)\
**Post date:** [April 7, 2017, 2:00pm UTC](https://discuss.elastic.co/t/logstash-kafka-output-adds-extra-topics/81618/1 "2017-04-07T14:00:51Z")

</div>

Hello,

I have a config file with Kafka output like this:

`topic_id => "%{product}-%{event_type}"`

It work fine and index the log to the corresponding topic, but additionaly it creates a new topic called `"%{product}"` with all the logs of that product, regardless the `"%{event_type}"`.

For example:  
I have this log:  
`{"product":"foo","event_type":"bar"}`  
And it goes this topics: `foo-bar` and `foo`

So my question is, how to avoid that the log goes to the topic `foo`?

Logstash version: 5.2.1

Regards,  
Joaquín Silva

---

<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:** [May 5, 2017, 2:13pm UTC](https://discuss.elastic.co/t/logstash-kafka-output-adds-extra-topics/81618/2 "2017-05-05T14:13:46Z")

</div>

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