# Logstash Kafka Output: UNKNOWN\_TOPIC\_OR\_PARTITION blocks all other logs

**URL:** <https://discuss.elastic.co/t/logstash-kafka-output-unknown-topic-or-partition-blocks-all-other-logs/164344>\
**Category:** Logstash\
**Created:** [January 15, 2019, 4:32pm UTC](https://discuss.elastic.co/t/logstash-kafka-output-unknown-topic-or-partition-blocks-all-other-logs/164344 "2019-01-15T16:32:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Bursik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeff_bursik/32/23626_2.png) [@Jeff\_Bursik](https://discuss.elastic.co/u/Jeff_Bursik)\
**Post date:** [January 15, 2019, 4:32pm UTC](https://discuss.elastic.co/t/logstash-kafka-output-unknown-topic-or-partition-blocks-all-other-logs/164344/1 "2019-01-15T16:32:46Z")

</div>

I'm curious if anyone else has faced this or if theres a recommended approach:

**Here is the setup:**

1. Docker Swarm node runs several docker containers
2. Logstash parses all docker containers on the node
3. Logstash pushes to a kafka topic based on the docker service name

**Here is the Issue:**  
Due to a constraint in the architecture, the kafka topics aren't auto created so if a docker service is deployed to the swarm node without a kafka topic pre-created, all other docker service logs aren't pushed. Logstash throws:

```auto
[2019-01-15T00:00:06,345][WARN][org.apache.kafka.clients.NetworkClient] [Producer clientId=producer-2] Error while fetching metadata with correlation id 2371908 : {topic1234=UNKNOWN_TOPIC_OR_PARTITION}

```

My initial thought is to validate that the kafka topic exists every time however that seems like a lot of extra processing on the output and will slow the output.

Any recommendations?

---

<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:** [February 12, 2019, 4:33pm UTC](https://discuss.elastic.co/t/logstash-kafka-output-unknown-topic-or-partition-blocks-all-other-logs/164344/2 "2019-02-12T16:33:04Z")

</div>

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