You can create a proxy route that consumes from a direct: endpoint,
converts the content to a higher-level object, and lastly uses the
recipientList DSL to send the exchange to a dynamically computed
endpoint, extracted from a message header, e.g.
FinalDestinationEnrich.

In the original route, before calling the enrich(), simply set the
FinalDestinationEnrich message header to the URI of the ultimate
endpoint.

How does that sound?

Regards,
Raul.

On 28 Mar 2012, at 00:20, GPRSLyons <gprsly...@gmail.com> wrote:

> Gents-
>
> As always, thanks for the help.
>
> In my route, it is very simple for me to convert the payload to JSON...
>
> .unmarshal().gzip()
> .unmarshal().json(JsonLibrary.Jackson, MyClass.class)
>
> However, I would like to enrich my content from multiple sources, such as...
>
> .loop(SOURCES.length)
> .enrich("source", new MyAggregationStrategy())
> .end
>
> Is there a way to apply that same conversion before the AggregationStrategy
> is called?  Working with byte arrays within the AggregationStrategy is
> becoming very complex.  I tried using the TypeConverter within the
> MyAggregationStrategy, but it is challenging to determine how to replicate
> the unmarshalling calls I make within the route in the same manner in the
> AggregationStrategy :(
>
> -Shan
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Enrichment-and-Type-Conversion-tp5599040p5599040.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to