Phillip Wirth created CAMEL-11415:
-------------------------------------

             Summary: FTP process is not running async
                 Key: CAMEL-11415
                 URL: https://issues.apache.org/jira/browse/CAMEL-11415
             Project: Camel
          Issue Type: Bug
          Components: camel-ftp
    Affects Versions: 2.19.0
            Reporter: Phillip Wirth


Hi there.

According to http://camel.apache.org/asynchronous-routing-engine.html camel-ftp 
can be run async.

However it is not possible since 
{{org.apache.camel.component.file.remote.RemoteFileConsumer#processExchange}} 
sets an exchange property {{Exchange.UNIT_OF_WORK_PROCESS_SYNC}} to {{true}} 
and in {{org.apache.camel.processor.CamelInternalProcessor#process}} this 
property gets evaluated and the processor is not running in async.

The comment in {{processExchange}} states that "mark the exchange to be 
processed synchronously as the ftp client is not thread safe" - the ftp client 
or the library? If the library is meant, is jsch for sftp, thread safe? 
Shouldn't this code be in the {{FTPConsumer}} class?

Also {{FromFtpAsyncProcessTest}} is kinda wired because it uses its own 
executor service to run async?

When async processing from an ftp espically sftp source is not possible the 
following code does not work as expected either

{code}
        onException(Exception.class)
                .maximumRedeliveries(maxTries)
                .redeliveryDelay(TimeUnit.HOURS.toMillis(delay))
                .continued(true);
{code} 




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to