Curious example. This actually appears to be more of a camel question than an ActiveMQ question.
Wearing my ActiveMQ hat, I see this: * message is produced to queue, queue.start, after manually setting JMSExpiration * message is consumed from queue in a transaction by camel * the camel exchange goes into a sleep() processor * the message is finally put in queue, queue.end Normally, JMSExpiration is ignored by ActiveMQ, but I would need to see if Camel is using magic to overcome that. JMSExpiration is a provider-internal header which it sets; the normal way to set an expiration is to set it on the MessageProducer. Looking at camel's JMS component, though, it seems to use that header itself. I suspect the DLQ.queue.end message is happening because camel is continuing to apply that header on the message outbound to queue.end, and ActiveMQ has nothing to consume queue.end, so that message times out. However, that doesn't explain the queue.start message going to the DLQ. Let me look into camel a little to confirm how it operates with JMSExpiration. -- View this message in context: http://activemq.2283324.n4.nabble.com/Behavior-when-a-message-expires-while-it-is-processing-tp4680241p4680262.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.