camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raul Kripalani <>
Subject Re: Enrichment and Type Conversion
Date Thu, 29 Mar 2012 06:36:22 GMT
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.

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

How does that sound?


On 28 Mar 2012, at 00:20, GPRSLyons <> 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:
> Sent from the Camel - Users mailing list archive at

View raw message