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 <[email protected]> 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: > http://www.nabble.com/Aggregator-on-a-fast-producer-freezing-up-tp25531217p25531217.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
