Hi I have logged a ticket to improved this in Camel https://issues.apache.org/jira/browse/CAMEL-4270
On Thu, Jul 21, 2011 at 1:53 PM, cwhistler <chadd.whist...@sungard.com> wrote: > Do you mean to propagate the entire inbound message into the outbound List so > that it is available when this List is returned? > > public List splitBody(Exchange exchange) > { > String fileName = (String) > exchange.getIn().getHeader(Exchange.FILE_NAME_ONLY); > log.info("Processing file - " + fileName); > BufferedReader inputReader = > exchange.getIn().getBody(BufferedReader.class); > StringBuffer sb = new StringBuffer(); > List messages = new ArrayList(); > *messages.add(exchange.getIn());* > . . . . > } > > or do you mean to add all of the headers from the inbound message to each of > the new messages that I am creating and putting in the list? > > private Message createOutput(*Exchange exchange*, String fileName, > String > participant, StringBuffer sb) > { > Message message = new DefaultMessage(); > message.setBody(sb.toString()); > *message.setHeaders(exchange.getIn().getHeaders());* > message.setHeader(Exchange.FILE_NAME, fileName + "." + > participant); > return message; > } > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/file-move-option-not-working-when-using-split-tp4616425p4619103.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/