Camel should reset the stream cache if the useOriginalInMessage option is true
------------------------------------------------------------------------------
Key: CAMEL-3791
URL: https://issues.apache.org/jira/browse/CAMEL-3791
Project: Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 2.6.0, 2.5.0, 2.7.0
Reporter: Willem Jiang
Assignee: Willem Jiang
Fix For: 2.8.0
--- src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
(revision 1083672)
+++ src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
(working copy)
@@ -591,18 +591,23 @@
// is the a failure processor to process the Exchange
if (processor != null) {
- // reset cached streams so they can be read again
- MessageHelper.resetStreamCache(exchange.getIn());
-
// prepare original IN body if it should be moved instead of
current body
if (data.useOriginalInMessage) {
if (log.isTraceEnabled()) {
log.trace("Using the original IN message instead of
current");
}
Message original =
exchange.getUnitOfWork().getOriginalInMessage();
exchange.setIn(original);
}
+ // reset cached streams so they can be read again
+ MessageHelper.resetStreamCache(exchange.getIn());
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira