camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Bourke <>
Subject Renamer failing to rename 'From' File when using multiple endpoints via Multicast
Date Fri, 22 Jan 2010 12:20:18 GMT

Hi all,

I am new to camel and have hit a problem that I hope someone can help me

I have a route that looks for a file in a directory => unmarshals the file
using <CSV> => transforms the output from the unmarshal (which is
List<List<String>>) to a List of data objetcs => passes the List of data
objects to a processor which does the intelligent mapping of the input data
to the output which is a List of Objects => passes the List of Objects to a
<multicast> pipeline who's endpoints traverse the List of Objects and
extract the data, that they are interested in, formatting the output in to a
List of Map objects so that the <CSV> marshaller can marshal to a named

This is the route: 

        <route id="iq">
            <from uri="file:/data/iq/inbound/"/>
                <csv id="pipeCsvDataFormat"/>
            <bean ref="iqTransform" method="doTransform"/>
            <to uri="bean:iqProcessor?method=process"/>
            <multicast parallelProcessing="true">
                    <to uri="bean:formatOutput?method=formatHeader"/>
                        <csv />
                    <to uri="bean:formatOutput?method=formatLineHeader"/>
                        <csv />

As expected, I get a correctly formatted file named Txn_Header.txt and a
file named Line_Header.txt in the /outbound directory. So the routing seems
to have worked fine.

The problem is that the original file does not get renamed in to the .camel
subdirectory and so the file gets processed again and again.

If I remove the second endpoint in the multicast so that only the
Txn_Header.txt file is produced then the original file does get renamed and
the route ends successfully.

Can someone help me understand what I have done wrong please?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message