Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7971511354 for ; Fri, 11 Apr 2014 08:38:27 +0000 (UTC) Received: (qmail 32804 invoked by uid 500); 11 Apr 2014 08:38:25 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 32672 invoked by uid 500); 11 Apr 2014 08:38: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 32663 invoked by uid 99); 11 Apr 2014 08:38:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Apr 2014 08:38:24 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.223.169 as permitted sender) Received: from [209.85.223.169] (HELO mail-ie0-f169.google.com) (209.85.223.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Apr 2014 08:38:20 +0000 Received: by mail-ie0-f169.google.com with SMTP id to1so5159770ieb.28 for ; Fri, 11 Apr 2014 01:38:00 -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=NkekcgjQbuf+LxptKo3Uao/Put5MZumwlfkHYdao7qs=; b=pRGXufJ2hSIrI4DghCVgMrEV/+el6b85el+Lz4IFb3u53Dm+zyotl2SZx1sOkAwby4 mx6pCM719n0tbndwIcVNYCEWEuhCT3ZB/RyamFwFsLCOWZh0xSnafEUd19x+stPh/Vrd 54Pgq1yqnL2N+rUZpQa6i7sI6sl+k3hnYMlJzqmLBJJO0wJFFlpNhBhIlp38M2EaJNJZ hjEgUW3udfZDp5mfePoX+vBxF4F0p6L7jgAMWcUq6aq3DzNZ1JY71AykiRNB49fSI39H ueGt4LdheUNyoH+vcGZMzDKTpgVdroEcbKqPu36sOQejn8oNbj+fIiDkkwO4h3i/TOHS FESg== X-Received: by 10.50.79.161 with SMTP id k1mr2513330igx.31.1397205480170; Fri, 11 Apr 2014 01:38:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.147.69 with HTTP; Fri, 11 Apr 2014 01:37:40 -0700 (PDT) In-Reply-To: <1397203111357-5750096.post@n5.nabble.com> References: <1397203111357-5750096.post@n5.nabble.com> From: Claus Ibsen Date: Fri, 11 Apr 2014 10:37:40 +0200 Message-ID: Subject: Re: Streaming huge files in Camel To: "users@camel.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi Maybe poll from the database with a limited set of data per poll. Also is 1 row in the database = 1 xml Then you can just poll one row at a time, not as efficient but it gets the job done. On Fri, Apr 11, 2014 at 9:58 AM, davidrobert wrote: > We have the following requirement: > 1. Poll from a database > 2. Marshall the result set into XML > 3. Send the XML in a JMS message to a downstream system > > The issue is, some of the result sets could be huge - millions of rows. The > transformer may be unable to handle this simply because of memory/heap space > limitations. There is also the issue of sending a massive message. > > Does Camel have an easy solution for this, some way of streaming the result > set to a transformer in small chunks, then sending individual messages for > each piece which are identified as part of a collection by some kind of > correlation id or something similar? > > Or is our requirement simply not suited for messaging infrastructure, in > which case we should look at a solution based around batch processing? > > Thanks > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Streaming-huge-files-in-Camel-tp5750096.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cibsen@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/