Skip to content

Commit

Permalink
Add Retry to (S)FTP; Update SI 4.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
garyrussell committed Jul 10, 2015
1 parent 92eb01d commit f30bb5f
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 9 deletions.
Expand Up @@ -23,6 +23,10 @@
<int-ftp:outbound-channel-adapter id="ftpOutbound"
channel="ftpChannel"
remote-directory="/"
session-factory="ftpClientFactory" />
session-factory="ftpClientFactory">
<int-ftp:request-handler-advice-chain>
<int:retry-advice />
</int-ftp:request-handler-advice-chain>
</int-ftp:outbound-channel-adapter>

</beans>
Expand Up @@ -28,7 +28,11 @@
command="ls"
command-options=""
expression="payload"
reply-channel="toSplitter"/>
reply-channel="toSplitter">
<int-ftp:request-handler-advice-chain>
<int:retry-advice />
</int-ftp:request-handler-advice-chain>
</int-ftp:outbound-gateway>

<int:channel id="toSplitter">
<int:interceptors>
Expand All @@ -47,7 +51,11 @@
reply-channel="toRemoveChannel"
command="get"
command-options="-P"
expression="payload.remoteDirectory + '/' + payload.filename"/>
expression="payload.remoteDirectory + '/' + payload.filename">
<int-ftp:request-handler-advice-chain>
<int:retry-advice />
</int-ftp:request-handler-advice-chain>
</int-ftp:outbound-gateway>

<int:channel id="toRemoveChannel">
<int:interceptors>
Expand All @@ -62,7 +70,11 @@
expression="headers['file_remoteDirectory'] + '/' + headers['file_remoteFile']"
request-channel="toRemoveChannel"
command="rm"
reply-channel="aggregateResultsChannel"/>
reply-channel="aggregateResultsChannel">
<int-ftp:request-handler-advice-chain>
<int:retry-advice />
</int-ftp:request-handler-advice-chain>
</int-ftp:outbound-gateway>

<int:aggregator input-channel="aggregateResultsChannel"/>

Expand Down
Expand Up @@ -31,7 +31,11 @@
command="ls"
command-options=""
expression="payload"
reply-channel="toSplitter"/>
reply-channel="toSplitter">
<int-sftp:request-handler-advice-chain>
<int:retry-advice />
</int-sftp:request-handler-advice-chain>
</int-sftp:outbound-gateway>

<int:splitter input-channel="toSplitter" output-channel="toGet"/>

Expand All @@ -42,13 +46,21 @@
reply-channel="toRm"
command="get"
command-options="-P"
expression="payload.remoteDirectory + payload.filename"/>
expression="payload.remoteDirectory + payload.filename">
<int-sftp:request-handler-advice-chain>
<int:retry-advice />
</int-sftp:request-handler-advice-chain>
</int-sftp:outbound-gateway>

<int-sftp:outbound-gateway id="gatewayRM" reply-channel="aggregateResultsChannel"
session-factory="sftpSessionFactory"
expression="headers['file_remoteDirectory'] + headers['file_remoteFile']"
request-channel="toRm"
command="rm"/>
command="rm">
<int-sftp:request-handler-advice-chain>
<int:retry-advice />
</int-sftp:request-handler-advice-chain>
</int-sftp:outbound-gateway>

<int:aggregator input-channel="aggregateResultsChannel"/>

Expand Down
Expand Up @@ -28,6 +28,10 @@
session-factory="sftpSessionFactory"
channel="inputChannel"
remote-filename-generator-expression="payload.getName() + '_foo'"
remote-directory="si.sftp.sample"/>
remote-directory="si.sftp.sample">
<int-sftp:request-handler-advice-chain>
<int:retry-advice />
</int-sftp:request-handler-advice-chain>
</int-sftp:outbound-channel-adapter>

</beans>
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -193,7 +193,7 @@ subprojects { subproject ->
postgresVersion = '9.1-901-1.jdbc4'
subethasmtpVersion = '1.2'
slf4jVersion = '1.7.11'
springIntegrationVersion = '4.1.5.RELEASE'
springIntegrationVersion = '4.1.6.RELEASE'
springIntegrationDslVersion = '1.0.2.RELEASE'
springVersion = '4.1.7.RELEASE'
springSecurityVersion = '3.2.4.RELEASE'
Expand Down

0 comments on commit f30bb5f

Please sign in to comment.