Re: How to retain exchange headers through RoutingSlip

2016-07-11 Thread David Hoffer
I'm back now trying to find a solution to this problem. First I changed the RoutingSlip to be a RecipientList, not sure that is significant but wanted to mention it. Let me try to better explain what this application does. We use Camel to route/transfer files from one location to a dynamic list

Re: How to retain exchange headers through RoutingSlip

2015-10-04 Thread Claus Ibsen
Hi Ah yeah read from a file and a file does not include any headers when you write to a file. The body is the content of the file. And all headers is not stored. You need to do some kind of custom message transformation if you want to include headers, and also when you read the file. eg where

Re: How to retain exchange headers through RoutingSlip

2015-10-04 Thread David Hoffer
I'm not trying to add any headers to the file when reading and writing...I'm just adding them to the Camel Exchange so that when the file is written in my Processor I have some 'metadata' about the file. I need the 'metadata' so I know where to write the file. I get the bytes to write from the

Re: How to retain exchange headers through RoutingSlip

2015-10-04 Thread Claus Ibsen
Hi Sorry I think you confuse us. You talk about routing slip and show some code of a route that starts from a file, and without any routing slip. Also see this FAQ http://camel.apache.org/why-do-my-message-lose-its-headers-during-routing.html On Sun, Oct 4, 2015 at 4:20 PM, David Hoffer

Re: How to retain exchange headers through RoutingSlip

2015-10-03 Thread David Hoffer
We add the headers where we create and/or call process on the routing slip... exchange.getIn().setHeader("customHeader1", somedata1); exchange.getIn().setHeader("customHeader2", somedata2); exchange.getIn().setHeader(routingSlipHeaderName, toUris); routingSlip.process(exchange); But then when

Re: How to retain exchange headers through RoutingSlip

2015-10-03 Thread Claus Ibsen
Where do you set those custom headers? On Fri, Oct 2, 2015 at 8:20 PM, David Hoffer wrote: > I'm using a RoutingSlip to route files but all custom headers set on the > Exchange are discarded. I assume that's because Camel assumes custom > headers are not useful for file

How to retain exchange headers through RoutingSlip

2015-10-02 Thread David Hoffer
I'm using a RoutingSlip to route files but all custom headers set on the Exchange are discarded. I assume that's because Camel assumes custom headers are not useful for file messages but I need a way to pass source information from the RoutingSlip to the file Processors. How can I do this? Is