Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0A472200BEB for ; Wed, 28 Dec 2016 16:56:25 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 04D17160B2E; Wed, 28 Dec 2016 15:56:25 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4CA86160B19 for ; Wed, 28 Dec 2016 16:56:24 +0100 (CET) Received: (qmail 93315 invoked by uid 500); 28 Dec 2016 15:56:23 -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 93299 invoked by uid 99); 28 Dec 2016 15:56:23 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Dec 2016 15:56:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 8196CC1382 for ; Wed, 28 Dec 2016 15:56:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.793 X-Spam-Level: * X-Spam-Status: No, score=1.793 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=pronoia-solutions-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id YBwYXug_hDUD for ; Wed, 28 Dec 2016 15:56:19 +0000 (UTC) Received: from mail-it0-f52.google.com (mail-it0-f52.google.com [209.85.214.52]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 8F2AE5F24B for ; Wed, 28 Dec 2016 15:56:19 +0000 (UTC) Received: by mail-it0-f52.google.com with SMTP id o141so171575224itc.0 for ; Wed, 28 Dec 2016 07:56:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pronoia-solutions-com.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=YkX6qN4qINxirTuNyt0LW6zJsbcN7h5V4nfpIvWNAxs=; b=lK6x/ZclsfqRt+aE9/di2nfSEWeKNTeSnqAiuhU22pYf4hx5Zcarkre/HTvuNQBoEN FpYqAY3QqcYSD54OOk0TCXtEswr776v70KYJgV7TPnsdmSBdaDNT5bfV7Tnqxi73OScE Q9Lq8XkEdEw8mQ9+C9zaIHSxEj8fOwlOELC8XWhyHrqx/KKea7uU73tu2pN9SxSnHQZg SaZ+X30w+OdhMJRRw3f1LYouthWStCsKQK3weNhrQoLtS16yClx5El2s9bCtnZ2I9IS8 Cw2OYLGZdv5ZbiOn3pKbNF92YMF1EsURQEb4F61WHMxpAM29f2yo/MiO2KdCPCSTIXoT R3aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=YkX6qN4qINxirTuNyt0LW6zJsbcN7h5V4nfpIvWNAxs=; b=BXZN7S6Odj1pMQH0Y8Bv5Y2F1gJ/u5UC16XPiwvRQduFIzQsJabLd4xLaRAS1HMKPO CdFNSek2PGOQv1E7YFZt2RPdbK1zLEWtq8DZ5lZ52HwnvmnIDzTNjtGest2GfawyB4rE fQS4pmbC9HGxmfQ+bTZZP/28Izr2jv0B2aAnDd5UXRUsjs1tmpyaBUdMnQBff+HUl0de 0/W5KWyhfsrZT1SGosBjSOvv79m8bz3x+HehGSA8PZU4zb/RDsg060Pci85n/QmbGJqE RsqVlrqImCWKho2wjtS9oexZn/geMDjQ+50wDJNksJw8J9aHYNfIXPUHCvkC+LismOJa JVgA== X-Gm-Message-State: AIkVDXKVPZegbBBCyxyiqXErBBxIOIICmdJAg/RSQJFpASsditmAOf3piJYO3w+wX/dJbA== X-Received: by 10.36.23.144 with SMTP id 138mr14785063ith.13.1482940570597; Wed, 28 Dec 2016 07:56:10 -0800 (PST) Received: from macpro.pronoia.local (c-73-20-8-23.hsd1.ut.comcast.net. [73.20.8.23]) by smtp.gmail.com with ESMTPSA id y134sm6778232iod.16.2016.12.28.07.56.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Dec 2016 07:56:10 -0800 (PST) From: Quinn Stevenson Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: is it better to use aggregator to write a large file hourly using messages from active mq queue? Date: Wed, 28 Dec 2016 08:56:09 -0700 References: <1482298968159-5791784.post@n5.nabble.com> To: dev@camel.apache.org In-Reply-To: <1482298968159-5791784.post@n5.nabble.com> Message-Id: <6A9CFC2D-7DA3-40E4-90DC-48120E08DCF6@pronoia-solutions.com> X-Mailer: Apple Mail (2.3259) archived-at: Wed, 28 Dec 2016 15:56:25 -0000 For a requirement such as this, I would probably schedule a route to = start hourly and write the file rather than use an aggregator. The = reason for this is I normally can=E2=80=99t lose any messages and if I = use an aggregator I need to have a persistent aggregation repository as = well to ensure I don=E2=80=99t lose any message. Since my messages are = already persisted in the JMS store, I don=E2=80=99t really see much = value in moving them from one store to another, just to hold them until = I write the file. =20 For this use case, you may also be able to just append to a file since = your filename has the timestamp in it - i.e use a fileName pattern like = yyyyMMddHH.txt and just append the records to it as they come in. I = don=E2=80=99t know if that would satisfy your use case or not. As far as whether or not it=E2=80=99s better to use an aggregator - it = depends on the use case. The use case you=E2=80=99ve given can be = accomplished without an aggregator, but I=E2=80=99ve had others that = require an aggregator. For me, its really a matter of what method fits = the use case better. HTH > On Dec 20, 2016, at 10:42 PM, beschi wrote: >=20 > I have a requirement of creating a large file hourly, the content of = the > files will be the records/line from active mq queue. >=20 > I am using the following code, is there any better option? >=20 > > > > > Test = File_${date:now:yyyyMMddHHmmssSSS}.txt > > completionInterval=3D"8600000"> > > true > > = uri=3D"file://d:/temp/temp1?fileExist=3DAppend&fileName=3D${headers.fi= leName}" > /> > > >=20 >=20 >=20 > -- > View this message in context: = http://camel.465427.n5.nabble.com/is-it-better-to-use-aggregator-to-write-= a-large-file-hourly-using-messages-from-active-mq-queue-tp5791784.html > Sent from the Camel Development mailing list archive at Nabble.com.