Aggregator not working for me in 2.0

View: New views
3 Messages — Rating Filter:   Alert me  

Aggregator not working for me in 2.0

by huntc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

I'm in the process of migrating one of my applications to Camel 2 and have noticed that my aggregator is not working (it was working before). Here it is:

from("jms-receiver:com.classactionpl.saveGPSTrackerCollection")
				.aggregate(gpsTrackerCollectionMergeAggregationStrategy)
				.header("collectionIdentification").batchSize(
						persistanceThreshold).batchTimeout(persistanceTimeout)
				.to("seda:saveGpsTrackerCollection");
persistanceThreshold = 100 and persistanceTimeout = 100.

I'm passing just one message in. My strategy actually doesn't get invoked (I observe this by setting a breakpoint in the strategy).

Any pointers?

Kind regards,
Christopher


Re: Aggregator not working for me in 2.0

by huntc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Many apologies - I found the problem. I thought that I was checking to see if the old exchange was null in my aggregation strategy. I was actually checking the body of the old exchange for null and thus a null pointer exception must have been thrown somewhere.

Re: Aggregator not working for me in 2.0

by Claus Ibsen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Aug 30, 2009 at 3:55 AM, huntc<huntc@...> wrote:
>
> Many apologies - I found the problem. I thought that I was checking to see if
> the old exchange was null in my aggregation strategy. I was actually
> checking the body of the old exchange for null and thus a null pointer
> exception must have been thrown somewhere.
> --

Glad you got it working as I was really wondering what could have
happened as we got tons of unit tests.

But yeah the AggregationStrategy has been changed to provide the
"result" in the IN message.
I do hope we get around the time in the future to allow a POJO for
aggregation as it would be easier to work with instead of low level
Exchange.


> View this message in context: http://www.nabble.com/Aggregator-not-working-for-me-in-2.0-tp25202246p25207993.html
> Sent from the Camel - Users (activemq) 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