As long you do not use a component which will marshall/unmarshall or
convert your payload into a different type, you don't have to worry about
the performance (this is the case for seda, direct, direct-vm, vm).

But if you e.g. multicast your exchange, the story is may different,
depending whether you use shallow or deep copies of your header objects.

May have a look at the claim check EIP [1] or the cache component [2] (if
you use the same header payload for multiple exchanges).

[1] http://camel.apache.org/claim-check.html
[2] http://camel.apache.org/cache.html

Best,

Christian
-----------------

Software Integration Specialist

Apache Member
V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
Apache Incubator PMC Member

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Fri, Oct 18, 2013 at 9:00 PM, Keith Freeman <[email protected]> wrote:

> Hello all,
>
> I'm considering a design where (in Java DSL) a component in my route would
> create a large object (a hashmap with thousands of entries totaling a few
> MB in size) and stick it in a header.  Then other components along the
> route would be able to access it for lookups and modifications.
>
> My question is whether I need to worry about performance with this design,
> assuming I keep the entire route within a single JVM?
>
> I do use direct:, direct-vm:, seda: and vm: endpoints in my routes, but my
> understanding is that all of these (including the header) will simply pass
> this along as an object reference, never making an copies or serializing it.
>
>

Reply via email to