camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From contactreji <contactr...@gmail.com>
Subject Camel - FTP endpoint issue
Date Fri, 23 May 2014 07:24:35 GMT
We use Camel Integration framework to develop our integration projects and
deploy them into Jboss Fuse container. We have a consumer end point as ftp. 

Route looks as follows 

<route errorHandlerRef="INVIntegration_myDeadLetterErrorHandler"
streamCache="true"> 

<from
uri="{{ftpProtocol}}://{{ftpUser}}@{{ftpHost}}:{{port}}{{path}}?password={{ftpPassword}}&amp;move=arc&amp;delay={{pollingInterval}}&amp;disconnect={{disconnectFlag}}"/>


<unmarshal ref="incomingDataFormat" /> 

<to uri="bean:csv" /> 

<to uri="activemq:INV.SAP.DATA" /> 

</route> 

All parameters are maintained in a property files. Now the issue we are
facing is as follows 

1) If we don't mentioned "disconnect=true" in FTP component, there are
infinite number of logins into the Filezilla FTP server which doesn't get
disconnected. And after some hours, FTP server stops allowing logins with
the user name and password throwing a message that "Too many users have
logged in with this username" As a solution to above problem, we tried using
"disconnect=true" while configuring FTP consumer endpoint which indeed
solved the above issue!! 

2) We started facing another problem after implementing above solution. When
a picked file is processed normally, the option "move=arc" on FTP component
works fine. The processed files are moved into the archive folder. But if
there is an exception and exception handlers are involved in the thread, the
above file movement doesn't happen and throws an error quoting "Could't
perform FTP operation to to unavailable FTP connection". This happened when
I implement the above fix mentioned in step 1. Since the file is not moved,
it goes into a infinite loop and same file is processed again. 

Now can you suggest how to deal with situation above.


 I want the FTP connection to be disconnected after file pick up. I also
want the file to be moved into archive folder after its processed by the
errorHandlers. Can both of them be achieved together? Is there a way to
force FTP component to move the file into ARC folder as soon as its consumed
and not wait for the thread to complete?



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-FTP-endpoint-issue-tp5751505.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message