# Kafka 0 partition metadata cannot be read in logstash6.8, other partitions can. Sample configuration:

**URL:** <https://discuss.elastic.co/t/kafka-0-partition-metadata-cannot-be-read-in-logstash6-8-other-partitions-can-sample-configuration/329055>\
**Category:** Logstash\
**Created:** [March 31, 2023, 1:31pm UTC](https://discuss.elastic.co/t/kafka-0-partition-metadata-cannot-be-read-in-logstash6-8-other-partitions-can-sample-configuration/329055 "2023-03-31T13:31:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![angus](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@angus](https://discuss.elastic.co/u/angus)\
**Post date:** [March 31, 2023, 1:31pm UTC](https://discuss.elastic.co/t/kafka-0-partition-metadata-cannot-be-read-in-logstash6-8-other-partitions-can-sample-configuration/329055/1 "2023-03-31T13:31:56Z")

</div>

```auto
kafka 0 partition metadata cannot be read in logstash6.8, other partitions can. Sample configuration:

input {
	kafka {
		client_id => "ycUsrRdNews"
		consumer_threads => 4
		bootstrap_servers => "${KAFKA_BOOTSTRAP_SERVERS}"
		topics => "ycUsrRdNews"
		group_id => "ycUsrRdNewsConsumerGroup"
		auto_offset_reset => "latest"
		decorate_events => true
		type => "ycUsrRdNews"
	}
    kafka {
        client_id => "ycUsrRdNews2"
        consumer_threads => 4
        bootstrap_servers => "${KAFKA_BOOTSTRAP_SERVERS_2}"
        topics => "ycUsrRdNews"
        group_id => "ycUsrRdNewsConsumerGroup2"
        auto_offset_reset => "latest"
        decorate_events => true
        type => "ycUsrRdNews"
    }
}

filter {
    if [type] == "ycUsrRdNews" {
    	json {
    	  source => "message"
    	  skip_on_invalid_json => true
          add_field => {
            "kafkaInfo" => "%{[@metadata][kafka][topic]}-%{[@metadata][kafka][consumer_group]}-%{[@metadata][kafka][partition]}-%{[@metadata][kafka][offset]}-%{[@metadata][kafka][timestamp]}"
          }
    	}
    }
}

output {
    if [type] == "ycUsrRdNews" {
        #stdout { codec => rubydebug }
        elasticsearch {
            hosts => ["${ELASTICSEARCH_HOSTS}"]
            index => "ycusrrd-news%{+YYYYMMdd}"
            user => "${ELASTICSEARCH_APP_LOG_USER}"
            password => "${ELASTICSEARCH_PASSWORD}"
        }

        if [level] == "ERROR" {
            elasticsearch {
                hosts => ["${ELASTICSEARCH_HOSTS}"]
                index => "ycusrrderr-news%{+YYYYMM}"
                user => "${ELASTICSEARCH_APP_LOG_USER}"
                password => "${ELASTICSEARCH_PASSWORD}"
            }
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [April 4, 2023, 1:45am UTC](https://discuss.elastic.co/t/kafka-0-partition-metadata-cannot-be-read-in-logstash6-8-other-partitions-can-sample-configuration/329055/2 "2023-04-04T01:45:44Z")

</div>

> [@angus](#):
>
> `kafka 0 partition metadata cannot be read in logstash6.8, other partitions can.`

You need to provide more context and share some logs that would indicate any issue.

It is not clear what is your issue here.

---

<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 2, 2023, 1:46am UTC](https://discuss.elastic.co/t/kafka-0-partition-metadata-cannot-be-read-in-logstash6-8-other-partitions-can-sample-configuration/329055/3 "2023-05-02T01:46:34Z")

</div>

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