Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 67763 invoked from network); 14 Oct 2009 13:08:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Oct 2009 13:08:26 -0000 Received: (qmail 30588 invoked by uid 500); 14 Oct 2009 13:08:25 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 30534 invoked by uid 500); 14 Oct 2009 13:08:25 -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 30524 invoked by uid 99); 14 Oct 2009 13:08:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2009 13:08:25 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.220.223 as permitted sender) Received: from [209.85.220.223] (HELO mail-fx0-f223.google.com) (209.85.220.223) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2009 13:08:22 +0000 Received: by fxm23 with SMTP id 23so10215105fxm.6 for ; Wed, 14 Oct 2009 06:08:01 -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:message-id:subject:to:content-type :content-transfer-encoding; bh=YciZOSFa5qrw+P4Zb3trZnBbTbEwZ+2HLdow5PLfeWU=; b=A1RkOzrZ+IOH1LQJ8hxVczPkuruvnC4tnzbhgWfSbwYhlsOmXS3WVZl0N3aC/Cqvky bwMpQuB8kxLOTBILrZyveLoIjvvmoTE+hllgcCmdIMAYEMIVuZxK+u+N01QdvS//rep5 jAMv0JXjFGzJ8ZwCwExI8RGiIpbRxL0Bha4uc= 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:content-transfer-encoding; b=WsZKR4Z3VjWldZNkdR1tlQCV4YilkLqZR/VonawUyZy/7DCBD/TrzPVoFhLTgyFLVR oCCr7Yx+1z6C9eB5fCp2aFAPaY7bn4ZbUiAbmYSCrIibXRXFvUD9e57NIaPAdtbAqOYs 90ZHVVq+YRefg1ad3E11svF6F3PPZ5gtGDXFI= MIME-Version: 1.0 Received: by 10.204.10.20 with SMTP id n20mr4593408bkn.161.1255525681248; Wed, 14 Oct 2009 06:08:01 -0700 (PDT) In-Reply-To: <25890696.post@talk.nabble.com> References: <25826380.post@talk.nabble.com> <25828828.post@talk.nabble.com> <25890696.post@talk.nabble.com> From: Claus Ibsen Date: Wed, 14 Oct 2009 15:07:41 +0200 Message-ID: <5380c69c0910140607w3fb011e7xca420a20ac2ad504@mail.gmail.com> Subject: Re: handling large files To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi How do you want to split the file? Is there a special character that denotes a new "record" Using java.util.Scanner is great as it can do streaming. And also what Camel can do if you for example want to split by new line etc. On Wed, Oct 14, 2009 at 3:01 PM, mcarson wrote: > > I have to solve this exact same problem! =A0I am also trying to: > =A0 -- read an extremely large file from a file system > =A0 -- doing a split on that file > =A0 -- send each split record to a JMS queue > > However I am relatively new to Camel.. I do not understand how the stream > component can help specify how much data to read before the split occurs.= .. > and when I tried to stream the file I got exceptions in my split because > when streaming the document it is no longer well formed XML? > > Can someone help explain in more detail how using the stream component > solves this problem? > > > This is the camel context I was using successfully to perform these tasks > for SMALL files: > > > =A0 =A0 =A0 xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" > =A0 =A0 =A0 xsi:schemaLocation=3D" > =A0 =A0 =A0 http://www.springframework.org/schema/beans > =A0 =A0 =A0 http://www.springframework.org/schema/beans/spring-beans-2.5.= xsd > =A0 =A0 =A0 http://camel.apache.org/schema/spring > =A0 =A0 =A0 http://camel.apache.org/schema/spring/camel-spring.xsd"> > > =A0 > =A0 =A0 > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 > =A0 =A0 > =A0 > > =A0 =A0 =A0 =A0 =A0xmlns:s=3D"http://schemas.xmlsoap.org/soap/envelope/"> > =A0 =A0camel.myprototype > > =A0 =A0 > =A0 =A0 =A0 > =A0 =A0 =A0 > =A0 =A0 =A0 =A0/s:Envelope/s:Body/person > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 > =A0 =A0 > =A0 > -- > View this message in context: http://www.nabble.com/handling-large-files-= tp25826380p25890696.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > --=20 Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus