From jira-return-9657-archive-asf-public=cust-asf.ponee.io@kafka.apache.org Wed Feb 7 04:36:07 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id DC028180657 for ; Wed, 7 Feb 2018 04:36:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CB4F4160C46; Wed, 7 Feb 2018 03:36:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1D237160C45 for ; Wed, 7 Feb 2018 04:36:06 +0100 (CET) Received: (qmail 21542 invoked by uid 500); 7 Feb 2018 03:36:06 -0000 Mailing-List: contact jira-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@kafka.apache.org Delivered-To: mailing list jira@kafka.apache.org Received: (qmail 21530 invoked by uid 99); 7 Feb 2018 03:36:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Feb 2018 03:36:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A1766C2C59 for ; Wed, 7 Feb 2018 03:36:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id vIWpJqG4LOmN for ; Wed, 7 Feb 2018 03:36:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 4D79E5F126 for ; Wed, 7 Feb 2018 03:36:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6BEA1E00B4 for ; Wed, 7 Feb 2018 03:36:03 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 5A33221E84 for ; Wed, 7 Feb 2018 03:36:01 +0000 (UTC) Date: Wed, 7 Feb 2018 03:36:00 +0000 (UTC) From: "Prasanna Subburaj (JIRA)" To: jira@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-6490) JSON SerializationException Stops Connect MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-6490?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1635= 4908#comment-16354908 ]=20 Prasanna Subburaj commented on KAFKA-6490: ------------------------------------------ Thanks for you response [~mjsax]. I think we need a similar feature in conn= ector because now if we get a malformed JSON message the connector will fai= l and will not process any additional message that are coming after this on= e. I can work on KIP for solving this issue if the forks you tagged in agre= e with what I am saying. Can you also please add me to the contributors lis= t ? > JSON SerializationException Stops Connect > ----------------------------------------- > > Key: KAFKA-6490 > URL: https://issues.apache.org/jira/browse/KAFKA-6490 > Project: Kafka > Issue Type: Bug > Components: KafkaConnect > Affects Versions: 1.0.0 > Reporter: William R. Speirs > Priority: Major > Attachments: KAFKA-6490_v1.patch > > > If you configure KafkaConnect to parse JSON messages, and you send it a n= on-JSON message, the=C2=A0SerializationException message will bubble up to = the top, and stop KafkaConnect. While I understand sending non-JSON to a JS= ON serializer is a bad idea, I think that a single malformed message=C2=A0s= topping all of KafkaConnect is even worse. > The data exception is thrown here: [https://github.com/apache/kafka/blob/= trunk/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverte= r.java#L305] > =C2=A0 > From the call here: [https://github.com/apache/kafka/blob/trunk/connect/r= untime/src/main/java/org/apache/kafka/connect/runtime/WorkerSinkTask.java#L= 476] > This bubbles all the way up to the top, and KafkaConnect simply stops wit= h the message: {{ERROR WorkerSinkTask\{id=3Delasticsearch-sink-0} Task thre= w an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime= .WorkerTask:172)}} > Thoughts on adding a {{try/catch}} around the {{for}} loop in WorkerSinkT= ask's {{convertMessages}} so messages that don't properly parse are logged,= but simply ignored? This way KafkaConnect can keep working even when it en= counters a message it cannot decode? -- This message was sent by Atlassian JIRA (v7.6.3#76005)