Show Table of Contents
2.13. Performance and Optimization
Avoid unnecessary message copying
You can avoid making an unnecessary copy of the original message, by setting the
allowUseOriginalMessage option to false on the CamelContext object. For example, in Blueprint XML you can set this option as follows:
<camelContext xmlns="http://camel.apache.org/schema/blueprint"
allowUseOriginalMessage="false">
...
</camelContext>
You can safely set
allowUseOriginalMessage to false, if the following conditions are satisfied:
- You do not set
useOriginalMessage=trueon any of the error handlers or on theonExceptionelement. - You do not use the
getOriginalMessagemethod anywhere in your Java application code.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.