camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernard Ligny <>
Subject OriginalMsg - Why is (only) the body cloned for JMS messages ?
Date Mon, 30 Apr 2012 08:46:32 GMT
I came across the following code (in Camel v2.6):

 public DefaultUnitOfWork(Exchange exchange)
            originalInMessage = new DefaultMessage();
           * originalInMessage.setBody(exchange.getIn().getBody());*
        } else
            originalInMessage = exchange.getIn().copy();

And I am wondering why such distinction is needed...
Why are JMS messages a special case where only the message body (and not the
headers) needs to be copied/cloned ?

According to me, this is serious limitation when working with
If you post web service requests to a JMS queue, then it means that you are
going to lose very important information (eg the query string, the
CamelHttpMethod, etc..), making thereby impossible to replay the requests
that are stored in your DLQ.

Is any fix available ? 
Or Any recommended workaround ?

Kind regards,


View this message in context:
Sent from the Camel Development mailing list archive at

View raw message