camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Mueller <>
Subject Loosing headers by using errorHandler and useOriginalMessage() in camel.jms
Date Wed, 29 Sep 2010 21:00:05 GMT

Hello list,

we are using camel-jms in conjunction with custom headers and the
useOriginalMessage() definition in our error handler for our exception
handling. We realized, that we loose all our headers in our dead letter
channel (using Camel 2.2.0.fuse-02-00). Our configuration looks like this



We digg this problem down to the DefaultUnitOfWork [1], which doesn't copy
the headers if the message is a JmsMessage. The documentation says:
//cannot copy headers with a JmsMessage as the underlying javax.jms.Message
object goes nuts

Two line above, the java doc also says:
// TODO: the copy on facade strategy will help us here in the future
// TODO: optimize to only copy original message if enabled to do so in the
// special for JmsMessage as it can cause it to loose headers later.
// This will be resolved when we get the message facade with copy on write

I have two questions:
1) How we can prevent or work around this (copy the original message into a
custom header and do not use useOriginalMessage(). And restore the original
message in the error flow from this custom header)?
2) When do you plan to fix this as the java doc suggests?



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

View raw message