From a2e7aa8ff227a1e747cd63defe66e6cf0f568cc5 Mon Sep 17 00:00:00 2001 From: Dave Hagler Date: Mon, 21 May 2018 16:41:38 -0400 Subject: [PATCH 1/2] Handle RecordTooLargeException Retrying will fail so catch the exception --- lib/logstash/outputs/kafka.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/logstash/outputs/kafka.rb b/lib/logstash/outputs/kafka.rb index e4d29f7..0c34c40 100644 --- a/lib/logstash/outputs/kafka.rb +++ b/lib/logstash/outputs/kafka.rb @@ -262,6 +262,9 @@ def retrying_send(batch) rescue org.apache.kafka.common.errors.InterruptException => e failures << record nil + rescue org.apache.kafka.common.errors.RecordTooLargeException => e + failures << record + nil rescue org.apache.kafka.common.errors.SerializationException => e # TODO(sissel): Retrying will fail because the data itself has a problem serializing. # TODO(sissel): Let's add DLQ here. From 142ba2f59a10a0b752db4f486d9c41a2d67c52b4 Mon Sep 17 00:00:00 2001 From: Dave Hagler Date: Thu, 31 May 2018 10:06:19 -0400 Subject: [PATCH 2/2] Change kafka download location in test setup Previous location was returning error --- kafka_test_setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kafka_test_setup.sh b/kafka_test_setup.sh index 771fb17..efb3f75 100755 --- a/kafka_test_setup.sh +++ b/kafka_test_setup.sh @@ -9,7 +9,7 @@ else fi echo "Downloading Kafka version $KAFKA_VERSION" -curl -s -o kafka.tgz "http://ftp.wayne.edu/apache/kafka/$KAFKA_VERSION/kafka_2.11-$KAFKA_VERSION.tgz" +curl -s -o kafka.tgz "https://archive.apache.org/dist/kafka/$KAFKA_VERSION/kafka_2.11-$KAFKA_VERSION.tgz" mkdir kafka && tar xzf kafka.tgz -C kafka --strip-components 1 echo "Starting ZooKeeper"