You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Sébastien Rebecchi <sr...@kameleoon.com> on 2022/11/29 16:48:00 UTC

Incorrect declared batch size, premature EOF reached

Hello,

I receive that exception while polling data with Kafka consumer.
I can't find how to recover from it, it prevents the consumer from
consuming new data.
Do you know what can be done to fix that?

I pasted the stack trace below, removing non significant data or replacing
it with generic patterns (like TOPIC-PARTITION).
Any help would be appreciated.

Sébastien Rebecchi

Received exception when fetching the next record from TOPIC-PARTITION. If
needed, please seek past the record to continue consumption.
org.apache.kafka.common.KafkaException: Received exception when fetching
the next record from TOPIC-PARTITION. If needed, please seek past the
record to continue consumption.
at
org.apache.kafka.clients.consumer.internals.Fetcher$PartitionRecords.fetchRecords(Fetcher.java:1473)
at
org.apache.kafka.clients.consumer.internals.Fetcher$PartitionRecords.access$1600(Fetcher.java:1332)
at
org.apache.kafka.clients.consumer.internals.Fetcher.fetchRecords(Fetcher.java:645)
at
org.apache.kafka.clients.consumer.internals.Fetcher.fetchedRecords(Fetcher.java:606)
at
org.apache.kafka.clients.consumer.KafkaConsumer.pollForFetches(KafkaConsumer.java:1263)
at
org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1225)
at
org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1201)
. . .
Caused by: org.apache.kafka.common.record.InvalidRecordException: Incorrect
declared batch size, premature EOF reached