camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Aggregator on a fast producer freezing up
Date Thu, 24 Sep 2009 06:47:24 GMT

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 milliseconds)
> to an ActiveMQ broker. What I want to do is persist 1 message every 1 second
> and the choice naturally falls to the aggregator:
> from("activemq:topic:input").aggregate().header("feedid")
>                         .batchSize(-1)
>                         .batchTimeout(1000L)
>                         .to("log:foo");
> This works fine when im producing messages close to the timeout value, but
> 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 there
> any settings I should tweak to be able to aggregate fast producers?
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Apache Camel Committer

Open Source Integration:

View raw message