camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Ivaniuk (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-6231) Camel Split doesn't processes the payload of the file, received via FTP
Date Tue, 02 Apr 2013 12:35:16 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-6231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Igor Ivaniuk updated CAMEL-6231:
--------------------------------

    Description: 
I'm having troubles trying to create a route that splits files received from FTP.

Here is the configuration (in Spring DSL):

{noformat}
<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&amp;throwExceptionOnConnectFailed=true&amp;binary=false&amp;passiveMode=true&amp;readLock=rename&amp;delete=true&amp;moveFailed=.failed&amp;include=.*\.txt&amp;delay=1000&amp;localWorkDirectory=../../camel_temp/&amp;username=username&amp;password=password&amp;maxMessagesPerPoll=100&amp;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>
{noformat} 

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:

{noformat}-rw-r--r-- 1 ftp ftp            141 Apr 02 08:04 FTP_ftpTest.txt_20130402081001301.txt{noformat}

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.

  was:
I'm having troubles trying to create a route that splits files received from FTP.

Here is the configuration (in Spring DSL):

{noformat}
<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&amp;throwExceptionOnConnectFailed=true&amp;binary=false&amp;passiveMode=true&amp;readLock=rename&amp;delete=true&amp;moveFailed=.failed&amp;include=.*\.txt&amp;delay=1000&amp;localWorkDirectory=../../camel_temp/&amp;username=username&amp;password=password&amp;maxMessagesPerPoll=100&amp;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>
{noformat} 

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.

    
> Camel Split doesn't processes the payload of the file, received via FTP
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-6231
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6231
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.10.4
>            Reporter: Igor Ivaniuk
>
> I'm having troubles trying to create a route that splits files received from FTP.
> Here is the configuration (in Spring DSL):
> {noformat}
> <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&amp;throwExceptionOnConnectFailed=true&amp;binary=false&amp;passiveMode=true&amp;readLock=rename&amp;delete=true&amp;moveFailed=.failed&amp;include=.*\.txt&amp;delay=1000&amp;localWorkDirectory=../../camel_temp/&amp;username=username&amp;password=password&amp;maxMessagesPerPoll=100&amp;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>
> {noformat} 
> 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:
> {noformat}-rw-r--r-- 1 ftp ftp            141 Apr 02 08:04 FTP_ftpTest.txt_20130402081001301.txt{noformat}
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message