camel-mina if exchange failed then out could potentially be a copy of in ------------------------------------------------------------------------
Key: CAMEL-364 URL: https://issues.apache.org/activemq/browse/CAMEL-364 Project: Apache Camel Issue Type: Bug Components: camel-mina Affects Versions: 1.3.0 Reporter: Claus Ibsen Priority: Minor Using the camel-mina component in synchronous mode (InOut exchange pattern) there is a potential bug if eg a processor throws an exception. This is a failed delivery in camel. And out-of-the-box the default policy is to retry up till 6 times. And if still failing camel-mina will continue and return a response to the client. The respons is a duplicate of the in body. A workaround is to set the out body to null immediately in your processor. If the body is null before the exception is thrown then camel-mina will no return a response. To reproduce the bug see the MinaTcpWithInOutUsingPlainSocketTest and remove the setbody null code below and the test should fail. {code} else if ("force-exception".equals(in)) { // clear out before throwing exception e.getOut().setBody(null); throw new IllegalArgumentException("Forced exception"); } {code} In MinaConsumer there is a TODO comment where the bug should be handled (from CAMEL-356) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.