Hi, I have a generic dead letter queue handler. Before messages are put onto the dead letter queue, my routes log details of the exceptions (via an interceptor within the same context). I'd like to also stamp the messages with the route and context from which the exception was thrown.
I could just type the correct names into every interceptor, but it would be nicer if I could do something like this: <!-- Make the route log the exception before sending to the dead letter queue --> <interceptSendToEndpoint uri="{{dead.letter.uri}}" id="deadletter-logger"> <log logName="jellyfish-messaging" loggingLevel="ERROR" message="Dead letter interceptor invoked" /> <to uri="log:org.jellyfish.notifications?level=ERROR&showCaughtException=true&showStackTrace=true&showException=true" /> * <setOutHeader headerName="DLQ-context"> <constant>{{camel-current-context-id}}</constant> </setOutHeader> <setOutHeader headerName="DLQ-route"> <constant>{{camel-intercepted-route-id}}</constant> </setOutHeader>* </interceptSendToEndpoint> You'll note that I'm already pulling in the dead letter queue name from config - i.e. {{dead.letter.uri}}. The magic sauce would be having environment variables like:- - {{camel-current-context-id}} - {{camel-intercepted-route-id}} Is this sort of thing available? I'm running Camel 2.12.3 and ActiveMQ on 5.7.0. Thanks, J.