You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by RTernier <ry...@hotmail.com> on 2013/05/13 19:10:19 UTC

How to persist data from aggregator?

I'm having an issue with aggregator. 

I have an incoming Web Service request that will be split into 2 messages
and have the responses of both web requests aggregated together. This works
fine, and I do get a good aggregated message within the aggregation route.

However, once I'm out of that route and it goes back to the main calling
route (bottom one) the message is not what is aggregated, it's one of the
responses from a web service call.  How do I force the aggregated message to
be the envelop that camel uses?

Here is my spring XML:








--
View this message in context: http://camel.465427.n5.nabble.com/How-to-persist-data-from-aggregator-tp5732421.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to persist data from aggregator?

Posted by RTernier <ry...@hotmail.com>.
works perfectly! Thanks Claus. Didn't realize the splitter had that built in.



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-persist-data-from-aggregator-tp5732421p5732512.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to persist data from aggregator?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

See the link again, and use *only* the splitter, as it has built-in aggregation.

On Tue, May 14, 2013 at 6:36 PM, RTernier <ry...@hotmail.com> wrote:
> Hey Claus,
>
> Thanks for the reply. I looked at that pattern, and I do get the aggregated
> results back properly - in the Aggregate route. However, once processing
> continues past that the exchange reverts back to what it was before it got
> split->aggregated.
>
> Using the link you posted, I changed my batch route to the following:
>
>
> As you can see, I aggregate after the split. Before I sent each message to
> the aggregate inside the <camel:when>.
>
> However, this and the previous give the same result:
>
> When logHere3 is hit, the exchange is the same as the one that got split,
> not the one that got aggregated.
>
> How can I fix this?
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-persist-data-from-aggregator-tp5732421p5732505.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: How to persist data from aggregator?

Posted by RTernier <ry...@hotmail.com>.
Hey Claus,

Thanks for the reply. I looked at that pattern, and I do get the aggregated
results back properly - in the Aggregate route. However, once processing
continues past that the exchange reverts back to what it was before it got
split->aggregated.

Using the link you posted, I changed my batch route to the following:


As you can see, I aggregate after the split. Before I sent each message to
the aggregate inside the <camel:when>.

However, this and the previous give the same result:

When logHere3 is hit, the exchange is the same as the one that got split,
not the one that got aggregated.

How can I fix this?




--
View this message in context: http://camel.465427.n5.nabble.com/How-to-persist-data-from-aggregator-tp5732421p5732505.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to persist data from aggregator?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

See this EIP
http://camel.apache.org/composed-message-processor.html

And use the splitter with the aggregation repository. Then you can
aggregate them easily back again in the same route.


On Mon, May 13, 2013 at 7:10 PM, RTernier <ry...@hotmail.com> wrote:
> I'm having an issue with aggregator.
>
> I have an incoming Web Service request that will be split into 2 messages
> and have the responses of both web requests aggregated together. This works
> fine, and I do get a good aggregated message within the aggregation route.
>
> However, once I'm out of that route and it goes back to the main calling
> route (bottom one) the message is not what is aggregated, it's one of the
> responses from a web service call.  How do I force the aggregated message to
> be the envelop that camel uses?
>
> Here is my spring XML:
>
>
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-persist-data-from-aggregator-tp5732421.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen