The enricher is just a common EIP implementation, we don't care much about the 
implementation of message.
I just went though the code, it could be more easy if you can override the 
default copy method of the heavy message.

I think we can enhance the enrich DSL by providing the plugin parameter to 
prepare the exchange for enricher target, but it real depends on how the 
enricher wants to reuse the message.  

Just my 2 cents.
--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, July 9, 2013 at 1:01 AM, solimo wrote:

> Hello!
>  
> After few route implementations which use enricher I've found it quite
> inconvenient to copy whole exchange. The concept is quite brilliant, but
> could anyone explain why, instead of implementing some
> ExchangeCreateStrategt (like AggregationStrategy for aggregation), the whole
> exchange is being copied? I can see two drawbacks here:
>  
> 1. When a message is quite heavy we will suffer (although it can be
> workarounded by implementing own Message and overriding copy method).
> 2. Usually, we do not need whole in message (to process in enricher target),
> so it's quite pointless to copy it as a whole and then transform (or select
> part of it) to format which is required.
>  
> So far, we've ended with own implementation of Enricher which requires
> additional bean reference of processor which copies exchange (in our case,
> it is used to select interesting data and fill new exchange with appropriate
> data format) in desired way.
>  
> Any way, I'm really curious why enricher has been implemented in such a way
> by Camel Team. Any reason? Maybe I miss something important :)!
>  
> Robert Budźko
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Enricher-coping-strategy-tp5735290.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).



Reply via email to