The aggregated exchange is the one that gets returned and how the
aggregated exchange is created depends on the aggregation strategy you use.
When a route stops either by calling stop or merely not routing anymore,
the exchange on the last part of the route could be considered a reply. In
most cases it will reply back to the caller (unless you set a reply-to
destination in a JMS based route or some other cases). In your case if all
you want to do is return the enriched exchange then you dont need any to()
call. Just stop after the marshal.

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39*


On Wed, Oct 2, 2013 at 1:21 PM, arunodhaya80 <t...@arunma.com> wrote:

> Apologies for not making myself clear enough.
>
> As you could see, I am using Camel to route the request to a REST service
> to
> two bean methods.  These bean methods enrich a single Entity through the
> AggregationStrategy configured in the multicast.
>
> My understanding is that the last exchange returned by the
> AggregationStrategy is the one which gets returned to the user via the REST
> response.  Is it correct?
>
> That being the case, I am not using the `to` at all.  Am I using the `to`
> to
> just to satisfy the compiler.  I don't, in fact, need to log the output.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Apache-Camel-Multicast-Is-there-a-null-or-a-similar-endpoint-tp5740664p5740780.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to