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.

Reply via email to