You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by wattsc3 <ch...@anz.com> on 2012/03/01 01:21:02 UTC
GroupedExchangeAggregationStrategy not working with HawtDB
I'd been bashing my head against the wall trying to get the default
aggregator (GroupedExchangeAggregationStrategy) working with HawtDB
aggregator repo, trying to work out why the exchange came out had no
properties until I found this on the help page.
/"And it only persists the Message body and the Message headers. The
Exchange properties are not persisted."
/
Give than GroupedExchangeAggregationStrategy does it by:
/ "Aggregate all exchanges into a single combined Exchange holding all the
aggregated exchanges in a java.util.List as a exchange property with the key
org.apache.camel.Exchange.GROUPED_EXCHANGE."/
So the question is, if these are the preferred solutions for aggregating why
don't they work together. Does everyone just write their own aggregation
strategy to store the list in the body instead of as a property?
We need the persistence so the messages are recoverable.
--
View this message in context: http://camel.465427.n5.nabble.com/GroupedExchangeAggregationStrategy-not-working-with-HawtDB-tp5526447p5526447.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: GroupedExchangeAggregationStrategy not working with HawtDB
Posted by cwatts <ch...@anz.com>.
I've ended up having to do that anyway as I want to split the messages later
and the splitter implementation is expecting a list of messages.
So my solution was to aggregate the Exhange.in message into a List and set
that as the body of the aggregated exchange.
That way split(body()) works as expected.
Yeh a note on the wiki would be helpful for others that may come across the
same problem.
Also as a note on the splitter wiki that the split function expects either a
List<String> for the body in a newly created message or a List<Message> for
the messages might be helpful.
--
View this message in context: http://camel.465427.n5.nabble.com/GroupedExchangeAggregationStrategy-not-working-with-HawtDB-tp5526447p5529465.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: GroupedExchangeAggregationStrategy not working with HawtDB
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Then use a custom strategy, which can be persisted.
I will add a note on the wiki page about the limitations of
GroupedExchangeAggregationStrategy
On Thu, Mar 1, 2012 at 1:21 AM, wattsc3 <ch...@anz.com> wrote:
> I'd been bashing my head against the wall trying to get the default
> aggregator (GroupedExchangeAggregationStrategy) working with HawtDB
> aggregator repo, trying to work out why the exchange came out had no
> properties until I found this on the help page.
> /"And it only persists the Message body and the Message headers. The
> Exchange properties are not persisted."
> /
>
> Give than GroupedExchangeAggregationStrategy does it by:
> / "Aggregate all exchanges into a single combined Exchange holding all the
> aggregated exchanges in a java.util.List as a exchange property with the key
> org.apache.camel.Exchange.GROUPED_EXCHANGE."/
>
> So the question is, if these are the preferred solutions for aggregating why
> don't they work together. Does everyone just write their own aggregation
> strategy to store the list in the body instead of as a property?
>
> We need the persistence so the messages are recoverable.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/GroupedExchangeAggregationStrategy-not-working-with-HawtDB-tp5526447p5526447.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/