Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 77184 invoked from network); 24 Sep 2009 06:48:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Sep 2009 06:48:16 -0000 Received: (qmail 87344 invoked by uid 500); 24 Sep 2009 06:48:16 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 87319 invoked by uid 500); 24 Sep 2009 06:48:16 -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 87309 invoked by uid 99); 24 Sep 2009 06:48:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Sep 2009 06:48:16 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.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; Thu, 24 Sep 2009 06:48:04 +0000 Received: by fxm23 with SMTP id 23so1181485fxm.6 for ; Wed, 23 Sep 2009 23:47:44 -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=iNUvy55by7OH2G+cS8zEG2nf9Do9/S2HfMeDOOmVtdQ=; b=Gl0EAnwSADsNH1zeZaG7VI+eimL41Uip4bDyuNJQ+xNw7DSPkCsRNluEUSABrJesvj UIkEt74qIJCkON7fGeFZ4lKd+pXKBcavGtg7HakXNnkAMottKWkbVoDF4qJ7y62Zklz5 nHGUg63ZJK6PbepO7DpqHo2IKRF0ElEiDTeTI= 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=TY1BdgLBLbiENVW2h14yAz6UbIYTwboMw5iWANO7CHRTIJR2SXs2BuPNPwhaCB+A0o OfYtaNEwfwL+DUd3fXps1nOw5alN6S9OGsnLc8WegE3MT7JgUnPhKcKcG+KpcX1trTyC jQJY5+PPL7icdGrnoTNrF9AHCn6AK17mMkWUs= MIME-Version: 1.0 Received: by 10.204.34.18 with SMTP id j18mr2675884bkd.38.1253774864145; Wed, 23 Sep 2009 23:47:44 -0700 (PDT) In-Reply-To: <25531217.post@talk.nabble.com> References: <25531217.post@talk.nabble.com> From: Claus Ibsen Date: Thu, 24 Sep 2009 08:47:24 +0200 Message-ID: <5380c69c0909232347y37a0c1aare46c40357a873202@mail.gmail.com> Subject: Re: Aggregator on a fast producer freezing up 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 If you do not care about the other messages and just want to persist a message every 1. second you could use a custom processor instead of the aggregator. And in this processor you could have a java.util.Timer (or a scheduled executor that is preferred over Timer) that awakes every 1th second and then send the last received message to a new destination. Kinda like the WireTap that just only taps every 1th second. On Wed, Sep 23, 2009 at 6:32 PM, ejot wrote: > > I have a STOMP producer sending messages very fast (tenths of millisecond= s) > to an ActiveMQ broker. What I want to do is persist 1 message every 1 sec= ond > and the choice naturally falls to the aggregator: > > from("activemq:topic:input").aggregate().header("feedid") > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 .batchSize(-1) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 .batchTimeout(1000L) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 .to("log:foo"); > > This works fine when im producing messages close to the timeout value, bu= t > as soon as i try to produce faster the aggregator will eventually freeze. > When I shut down the producer when sending fast the aggregator processes = all > pending exchanges and properly aggregates. > > Is there some other method I should use for a scenario like this? Are the= re > any settings I should tweak to be able to aggregate fast producers? > -- > View this message in context: http://www.nabble.com/Aggregator-on-a-fast-= producer-freezing-up-tp25531217p25531217.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