We use currently Camel 2.17.7 and will upgrade to 2.20.2.

With 2.20.2 we have a new unexpected behaviour.
We use in some routes ExchangePattern.InOnly.
To remove unwanted headers, we set our required headers and body to 
In the next bean we always get the "cleaned" exchange object where in the IN 
part of the exchange only our expected headers are available.
1.    Due to the adaption from 
CAMEL-10424<https://issues.apache.org/jira/browse/CAMEL-10424> all headers from 
IN and OUT are merged in Method "MethodInfo.fillResult" because exchange 
objects will be handled as OUT capable when exchange.hasOut()=true.
// the bean component forces OUT if the MEP is OUT capable
boolean out = ExchangeHelper.isOutCapable(exchange) || exchange.hasOut();

I expected that no "old" headers are available in the next bean and that 
setting from OUT to IN is only done in Method 
public static Exchange createNextExchange(Exchange previousExchange) {
Exchange answer = previousExchange;
// now lets set the input of the next exchange to the output of the
// previous message if it is not null
if (answer.hasOut()) {
return answer;

Is this adaptation a break against the message exchange pattern or does we use 
this in a wrong way?

Thank you in advance!

Reply via email to