camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From solimo <rob...@budzko.eu>
Subject Enricher - coping strategy
Date Mon, 08 Jul 2013 17:01:59 GMT
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.

Mime
View raw message