Rajithamol Lakshmanan created CAMEL-11670:
---------------------------------------------

             Summary: Camel Aggregator strategy Exchange- 
java.lang.ClassCastException - org.apache.camel.impl.DefaultMessage cannot be 
cast to org.apache.camel.component.jms.JmsMessage
                 Key: CAMEL-11670
                 URL: https://issues.apache.org/jira/browse/CAMEL-11670
             Project: Camel
          Issue Type: Bug
            Reporter: Rajithamol Lakshmanan


I am using camel-aggregator for aggregating JMS messages. When I upgraded the 
camel version from 2.15.6 to 2.18.0 I started getting ClassCastException  in 
the aggregatorstrategy class. 

Error occurred during aggregation. Exchange[]. Caused by: 
[java.lang.ClassCastException - org.apache.camel.impl.DefaultMessage cannot be 
cast to org.apache.camel.component.jms.JmsMessage]. 

I debugged and found that AggregatorProcessor calls 
ExchangeHelper.createCorrelatedCopy which copies the exchange harcoding the 
safeMode to be true. 

In 2.18.0 : Exchange copy = exchange.copy(true); 
In 2.15.6 : Exchange copy = exchange.copy(); 

Because of this we are not getting the original JMS message- javax.jms.Message 
inside org.apache.camel.Message .

Can we have an option to configure this deep copy option?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to