Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-3827

(s)ftp:inbound-channel-adapter local-filter is not reversible

    XMLWordPrintable

    Details

      Description

      Configure a local-filter with a ReversibleFileListFilter on a (s)ftp:inbound-channel-adapter.
      In case of a transaction-failure for a downloaded file the rollback method of the local-filter will not be called.
      As a result the filter still has the failed file registered and the file will not be re-processed until the filter is reset.
      This is because the configured filter is always wrapped in a CompositeFileListFilter.
      Perhaps a ReversibleCompositeFileListFilter can help.

      My use case is: sftp inbound --> transform --> smtp outbound.
      The configuration of the inbound-channel-adapter is:

      <int-sftp:inbound-channel-adapter
            id="IN_sftpInboundAdapter"
            channel="IN_fileChannel"
            session-factory="IN_sessionFactory"
            local-directory="${inbound.local.directory}"
            remote-directory="${inbound.remote.directory}"
            auto-create-local-directory="true"
            delete-remote-files="false"
            auto-startup="${inbound.auto-startup}"
            local-filter="IN_localFileListFilter">
            <int:poller task-executor="taskScheduler"
                            error-channel="IN_errorChannel"
                            fixed-rate="${inbound.poller.fixed-rate}"
                            max-messages-per-poll="${inbound.poller.max-messages-per-poll}" />
            </int-sftp:inbound-channel-adapter>
      
          <bean id="IN_localFileListFilter"  class="org.springframework.integration.file.filters.AcceptOnceFileListFilter">
              <constructor-arg value="100" />
          </bean>
      
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              grussell Gary Russell
              Reporter:
              simonharinck Simon Harinck
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: