Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 25584 invoked from network); 8 Dec 2010 21:37:46 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Dec 2010 21:37:46 -0000 Received: (qmail 20269 invoked by uid 500); 8 Dec 2010 21:37:46 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 20215 invoked by uid 500); 8 Dec 2010 21:37:46 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 20207 invoked by uid 99); 8 Dec 2010 21:37:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Dec 2010 21:37:46 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lenkite@gmail.com designates 209.85.213.45 as permitted sender) Received: from [209.85.213.45] (HELO mail-yw0-f45.google.com) (209.85.213.45) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Dec 2010 21:37:39 +0000 Received: by ywl5 with SMTP id 5so1110593ywl.32 for ; Wed, 08 Dec 2010 13:37:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=7J7eCeh+6CCMjLKdwZcX2bItQU6+iLT2d6o2p9VOksM=; b=osouGkRScB0jQT8OydosvaBcDZ8tq2K5XVxTIbAKHeIrflxzdMY2vyR6x5IRDzCDgo ElTZ3hIOFKaX200rAgo+LP1/UphnNzJYmn2sWpyd+JRrwAUNpLH0hGcmlifwvlrpAgJX p5VCWXFhfGJrvaQT1UzDZGo4wsMKst5VIq7Vk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=DWI6OIhcPoFJ28jQgiQe6bUNEctRdiQQ40zeMh12Mu5cDEMvrzVQrfAye1G5LhuvPO WbEwnk8lq5Jw/X3AGGMVnG4x8YbGBCXD9M2nfRK1O2h6LPwJkYVcQtIbiADzxNLOS/OC WbaGw53MQaUsT7vmXPigQPONYR4/2Ydc4+9mE= MIME-Version: 1.0 Received: by 10.231.12.10 with SMTP id v10mr1808232ibv.176.1291844238116; Wed, 08 Dec 2010 13:37:18 -0800 (PST) Received: by 10.231.85.149 with HTTP; Wed, 8 Dec 2010 13:37:18 -0800 (PST) Date: Thu, 9 Dec 2010 03:07:18 +0530 Message-ID: Subject: Camel File Component and the Splitter From: Tarun Ramakrishna To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi all, I have a puzzler and I thought I would throw it to the list before going into camel debugging. I have a custom mapping processor that given an Exchange, takes its payload, split it to several payloads, creates an array list of byte[] and sets them back into the IN message of the exchange. In the next step, I use the Camel splitter to send Message 0 of the splitter and Message 1 of the splitter to different components. Here is the rub - if these components are file components, nothing happens! When I replace them by components other than the file components, say: =A0mock endpoints or logging endpoints, I clearly see the exchanges being produced! SNIPPET: //In the below the 'pim' component is my custom component that split the message into an arraylist of byte[] and sets it as the IN message body as recommended by FAQ Entry: How do I write a custom Processor which sends multiple messages? from("direct:start") .to("pim:SplitMapping01.zip?cardinality=3D1_N") .split(simple("${in.body}")) .choice() .when(header("CamelSplitIndex").isEqualTo(0)) .to("file://tmp/tringo") .to("log:MESSAGE1?level=3DERROR") .when(header("CamelSplitIndex").isEqualTo(1)) .to("file://tmp/bingo") .to("log:MESSAGE2?level=3DERROR"); The log statements issued by MESSAGE1 and MESSAGE2 are indeed seen, but no files are produced in either of 'tringo' or 'bingo' directories!. Maybe, I am making a stupid mistake somewhere but I can't see it ? Example Output (The 2 log statements get issued shown below) Dec 9, 2010 3:03:33 AM org.apache.camel.processor.Logger process SEVERE: Exchange[ExchangePattern:InOnly, BodyType:byte[], Body: 0815AuntEmmaStore01-12345-APotato 1 kg1.5010001-12346-AA= pple 1 kg1.9980] Dec 9, 2010 3:03:33 AM org.apache.camel.processor.Logger process SEVERE: Exchange[ExchangePattern:InOnly, BodyType:byte[], Body:0815AuntEmmaStore01= -12345-A01-12346-A00-12345-A<= /ProductID>] All advice/help appreciated! Thanks & Regards, Tarun