Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Invalid
-
2.10.4
-
None
-
None
-
Unknown
Description
I'm having troubles trying to create a route that splits files received from FTP.
Here is the configuration (in Spring DSL):
<camelContext id="receiveFTP" trace="true" xmlns="http://camel.apache.org/schema/spring" > <threadPoolProfile id="receiveFTP-splitter-profile" defaultProfile="false" poolSize="20" maxPoolSize="30"/> <!-- Endpoints --> <endpoint id="FileOutput" uri="file:D:/Temp/camel-test/ftpReceive/?fileName=Received_${exchangeId}_${file:onlyname}" /> <endpoint id="FTPSource" uri="ftp://192.168.21.11:21/folder/?pollStrategy=#ftpPollStrategy&throwExceptionOnConnectFailed=true&binary=false&passiveMode=true&readLock=rename&delete=true&moveFailed=.failed&include=.*\.txt&delay=1000&localWorkDirectory=../../camel_temp/&username=username&password=password&maxMessagesPerPoll=100&consumer.bridgeErrorHandler=true" /> <!-- Routes --> <route id="ReceiveFromFTP"> <from ref="FTPSource" /> <threads poolSize="1" maxPoolSize="1"> <split streaming="true" parallelProcessing="true" executorServiceRef="receiveFTP-splitter-profile"> <tokenize token="\r\n"/> <to ref="FileOutput"/> </split> </threads> </route> </camelContext>
The FTP location contains a file with several lines, I'm trying to split it, and in the output location I have one file with the following content:
-rw-r--r-- 1 ftp ftp 141 Apr 02 08:04 FTP_ftpTest.txt_20130402081001301.txt
Looks like the Split component doesn't take the payload of the received file. Even more, adding <convertBodyTo type="java.lang.String"/> before splitting resolves the problem. But I assume this is not expected behavior.