Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2AB9917322 for ; Thu, 24 Sep 2015 14:06:10 +0000 (UTC) Received: (qmail 60703 invoked by uid 500); 24 Sep 2015 14:05:11 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 60662 invoked by uid 500); 24 Sep 2015 14:05:11 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 60650 invoked by uid 99); 24 Sep 2015 14:05:11 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Sep 2015 14:05:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id DF451181131 for ; Thu, 24 Sep 2015 14:05:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id AdNY2hxszNIY for ; Thu, 24 Sep 2015 14:04:59 +0000 (UTC) Received: from mail-ig0-f171.google.com (mail-ig0-f171.google.com [209.85.213.171]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 4BA7527A06 for ; Thu, 24 Sep 2015 14:04:58 +0000 (UTC) Received: by igcpb10 with SMTP id pb10so15583158igc.1 for ; Thu, 24 Sep 2015 07:04:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=aQkjZm6yQho6Err/XkfXay7UjE7C2B07g9N5gPIUdnI=; b=bZe0y2Jci4L4M7tMUXSUczfXW/pWkLbGD6ibSkhdw34bvGCIU/t4ar6jIB7py4RqPB jcm2P6b12y2YN2XSKNIGJ9z5gJgTSrfbzv/jX8kApoNZHc7o25hOmi5DdbNotqsYNkaD z9Ov1mqY9flVIIovhfVBYPUpnkq5neLPU2tdeUIOqeijo5+TTNqYI9FsTC2BHFXMrZQB iDdNztbVuw8ZLjwpN6HNoKeTadOsAkL5WNyGkR6pUFMxQICC37B9xJ1QsOLleKKegEOq /D430gRKnEwhnCURltxvBGpnXc0celXmbU1IGyjggVKDqEHeThId7SKe1kwHLNxtZAlL MKhA== X-Received: by 10.50.142.7 with SMTP id rs7mr1736970igb.62.1443103497298; Thu, 24 Sep 2015 07:04:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.117.67 with HTTP; Thu, 24 Sep 2015 07:04:37 -0700 (PDT) In-Reply-To: References: From: Claus Ibsen Date: Thu, 24 Sep 2015 16:04:37 +0200 Message-ID: Subject: Re: Sending stats back to Jetty after split To: dev Content-Type: text/plain; charset=UTF-8 The splitter supports an aggregation strategy where you can build a repsonse object with the splitted messages. See splitter only example on http://camel.apache.org/composed-message-processor.html On Thu, Sep 24, 2015 at 3:59 PM, Asaf Mesika wrote: > Hi, > > I have a Jetty end-point which I consume (hope I'm getting the right > terminology, still I'm still learning this) - meaning it's acting as a > server accepting a POST request containing lines separated by a new-line. > > I then have a streaming splitter based on new line, and then a parse-json > processor which parses the line as JSON. After that I'm sending it to a > direct end-point (which is another route). > > I would like to send back stats as a response, including the number of > lines which failed parsing. > > I couldn't find a way to to relay this stats from the parse-json processor > back to the original exchange which left the Jetty end-point. > Any idea? > > > Question 2: > > I would like to extend the splitter to have a max line length, thus if > someone send 10 lines, but the 3rd is 2 mb long, then it will gracefully > skipped. > Does it exists some where other than the main camel repo? > > If I would like to commit this feature back, what is the exact process I > should follow? > > Thanks! > > Asaf -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2nd edition: https://www.manning.com/books/ibsen2