Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 64111 invoked from network); 2 Apr 2010 14:37:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Apr 2010 14:37:31 -0000 Received: (qmail 18155 invoked by uid 500); 2 Apr 2010 10:37:31 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 17941 invoked by uid 500); 2 Apr 2010 10:37:29 -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 17931 invoked by uid 99); 2 Apr 2010 10:37:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 10:37:28 +0000 X-ASF-Spam-Status: No, hits=-1.1 required=10.0 tests=AWL,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.218.223 as permitted sender) Received: from [209.85.218.223] (HELO mail-bw0-f223.google.com) (209.85.218.223) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 10:37:24 +0000 Received: by bwz23 with SMTP id 23so1609571bwz.36 for ; Fri, 02 Apr 2010 03:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:received:message-id:subject:to:content-type; bh=XqBBXVOJCmyHfZ6CGEAiwrkZ9xDk4dUMh8GtJvu3A7o=; b=XVEwBlDes/Sf/HI89lsEg++oJ81vAf/e0C7oDeg5xn4S32G6XdWH3pYB1Qme/Awd6y iMFKoBDYVlmqjtfnXQ4aj0oCGSNTs9Dbewk802SrLjyVvzutzwlz1Uccgn7Yor9+/91H VipwKXOFdrsigK/oADw1XSCWGSMsIZFK5Qv1c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=tm9aOBU1mSrtm5Te595oP++dkaSeCxTCFFZLlYUYQR7S6la04VU5VvEctYMyhIh+oL 8v43EdlIYQlsDRlj59WAPiZqzwXFN6JHzO1cxcLV8vNjDMOKxHqZqmgzuamVfOttyAE/ 4JGb1Sx4PiuTH9PP1ZbwUGQhurYJesoXSMVsE= MIME-Version: 1.0 Received: by 10.204.59.137 with HTTP; Fri, 2 Apr 2010 03:36:40 -0700 (PDT) In-Reply-To: <28117514.post@talk.nabble.com> References: <28117514.post@talk.nabble.com> From: Claus Ibsen Date: Fri, 2 Apr 2010 12:36:40 +0200 Received: by 10.204.162.145 with SMTP id v17mr2641478bkx.83.1270204620588; Fri, 02 Apr 2010 03:37:00 -0700 (PDT) Message-ID: Subject: Re: Unmarshalling CSV files and send many messages To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 On Fri, Apr 2, 2010 at 12:06 PM, justme2 wrote: > > Hi, > I'm evaluating Camel in order to find out if it could be integrated in a > system. > What I'm trying to do is to set a file endpoint that reads csv files. > Those csv files contain about 100 lines each that should be sent as 100 > messages to different endpoints (jms queues) regarding the content of every > line. > At first glance seems that Camel file component manages files as a whole > object allowing to check for specific content (i.e. for routing) but not > considering single lines as in my use-case. > Any suggestion ? > Thanks > You use the EIP patterns for such kind of work. They provide great building blocks for your routing and integration needs. http://camel.apache.org/enterprise-integration-patterns.html See the splitter EIP which can split the file into a line by line basis http://camel.apache.org/splitter.html The Camel in Action book contains such a CSV file -> split -> X lines example in chapter 13. http://www.manning.com/ibsen/ The source code is here, so you can find the example in chapter13/startup directory. http://code.google.com/p/camelinaction/ > Rob > -- > View this message in context: http://old.nabble.com/Unmarshalling-CSV-files-and-send-many-messages-tp28117514p28117514.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus