You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes: #10372
The `AbstractInboundFileSynchronizingMessageSource` uses a `CompositeFileListFilter`
for a combination of the user-provided filter and then the one to ignore temporary files.
However, the `CompositeFileListFilter` logic is `OR`, which means the temporary
file might be accepted by the user-provided.
* Fix the `AbstractInboundFileSynchronizingMessageSource.buildFilter()`
to use a `ChainFileListFilter` instead (with an `AND` logic), and put `ignoreTemporaryFiles`
filter as the first one.
* Fix (S)FTP docs for an actual logic regarding local files filtering.
**Cherry-pick to `6.5.x`**
Copy file name to clipboardExpand all lines: spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/AbstractInboundFileSynchronizingMessageSource.java
Copy file name to clipboardExpand all lines: src/reference/antora/modules/ROOT/pages/ftp/inbound.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ metadata store on every update (if the store implements `Flushable`).
87
87
88
88
IMPORTANT: Further, if you use a distributed `MetadataStore` (such as xref:redis.adoc#redis-metadata-store[Redis]), you can have multiple instances of the same adapter or application and be sure that each file is processed only once.
89
89
90
-
The actual local filter is a `CompositeFileListFilter` that contains the supplied filter and a pattern filter that prevents processing files that are in the process of being downloaded (based on the `temporary-file-suffix`).
90
+
The actual local filter is a `ChainFileListFilter` that contains a pattern filter that prevents processing files that are in the process of being downloaded (based on the `temporary-file-suffix`) and the supplied filter.
91
91
Files are downloaded with this suffix (the default is `.writing`), and the file is renamed to its final name when the transfer is complete, making it 'visible' to the filter.
92
92
93
93
The `remote-file-separator` attribute lets you configure a file separator character to use if the default '/' is not applicable for your particular environment.
Copy file name to clipboardExpand all lines: src/reference/antora/modules/ROOT/pages/sftp/inbound.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ You can handle any other use-cases by using `CompositeFileListFilter` (or `Chain
69
69
70
70
The above discussion refers to filtering the files before retrieving them.
71
71
Once the files have been retrieved, an additional filter is applied to the files on the file system.
72
-
By default, this is an`AcceptOnceFileListFilter`, which, as discussed in this section, retains state in memory and does not consider the file's modified time.
72
+
By default, this is an`AcceptOnceFileListFilter`, which, as discussed in this section, retains state in memory and does not consider the file's modified time.
73
73
Unless your application removes files after processing, the adapter re-processes the files on disk by default after an application restarts.
74
74
75
75
Also, if you configure the `filter` to use a `SftpPersistentAcceptOnceFileListFilter` and the remote file timestamp changes (causing it to be re-fetched), the default local filter does not allow this new file to be processed.
@@ -86,7 +86,7 @@ metadata store on every update (if the store implements `Flushable`).
86
86
87
87
IMPORTANT: Further, if you use a distributed `MetadataStore` (such as xref:redis.adoc#redis-metadata-store[Redis Metadata Store]), you can have multiple instances of the same adapter or application and be sure that one and only one instance processes a file.
88
88
89
-
The actual local filter is a `CompositeFileListFilter` that contains the supplied filter and a pattern filter that prevents processing files that are in the process of being downloaded (based on the `temporary-file-suffix`).
89
+
The actual local filter is a `ChainFileListFilter` that contains a pattern filter that prevents processing files that are in the process of being downloaded (based on the `temporary-file-suffix`) and the supplied filter.
90
90
Files are downloaded with this suffix (the default is `.writing`), and the files are renamed to their final names when the transfer is complete, making them 'visible' to the filter.
91
91
92
92
See the https://github.com/spring-projects/spring-integration/tree/main/spring-integration-core/src/main/resources/org/springframework/integration/config[schema] for more detail on these attributes.
0 commit comments