Skip to content

Commit

Permalink
GH-8691: Add changes to the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamaSorho committed Sep 11, 2023
1 parent 66c1315 commit dbc3e1d
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/reference/antora/modules/ROOT/pages/ftp/inbound.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,23 @@ You should also understand that the FTP inbound channel adapter is a polling con
Therefore, you must configure a poller (by using either a global default or a local sub-element).
Once a file has been transferred, a message with a `java.io.File` as its payload is generated and sent to the channel identified by the `channel` attribute.

Starting with version 6.2, you can filter FTP files based on last-modified strategy using `FtpLastModifiedFileListFilter`.
This filter can be configured with an `age` property so that only files older than this value are passed by the filter.
The age defaults to 60 seconds, but you should choose an age that is large enough to avoid picking up a file early (due to, say, network glitches).
The following example shows how to configure a `FtpLastModifiedFileListFilter`:

[source, java]
----
@Bean
public FtpLastModifiedFileListFilter ftpLastModifiedFileListFilter() {
FtpLastModifiedFileListFilter filter = new FtpLastModifiedFileListFilter();
filter.setAge(Duration.ofSeconds(180));
return filter;
}
----

[[more-on-file-filtering-and-incomplete-files]]
== More on File Filtering and Incomplete Files

Expand Down
17 changes: 17 additions & 0 deletions src/reference/antora/modules/ROOT/pages/sftp/inbound.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,23 @@ SFTP inbound channel adapter is a polling consumer.
Therefore, you must configure a poller (either a global default or a local element).
Once the file has been transferred to a local directory, a message with `java.io.File` as its payload type is generated and sent to the channel identified by the `channel` attribute.

Starting with version 6.2, you can filter SFTP files based on last-modified strategy using `SftpLastModifiedFileListFilter`.
This filter can be configured with an `age` property so that only files older than this value are passed by the filter.
The age defaults to 60 seconds, but you should choose an age that is large enough to avoid picking up a file early (due to, say, network glitches).
The following example shows how to configure a `SftpLastModifiedFileListFilter`:

[source, java]
----
@Bean
public SftpLastModifiedFileListFilter sftpLastModifiedFileListFilter() {
SftpLastModifiedFileListFilter filter = new SftpLastModifiedFileListFilter();
filter.setAge(Duration.ofSeconds(180));
return filter;
}
----

[[more-on-file-filtering-and-large-files]]
== More on File Filtering and Large Files

Expand Down
17 changes: 17 additions & 0 deletions src/reference/antora/modules/ROOT/pages/smb.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,23 @@ public MessageSource<File> smbMessageSource() {

For XML configuration the `<int-smb:inbound-channel-adapter>` component is provided.

Starting with version 6.2, you can filter SMB files based on last-modified strategy using `SmbLastModifiedFileListFilter`.
This filter can be configured with an `age` property so that only files older than this value are passed by the filter.
The age defaults to 60 seconds, but you should choose an age that is large enough to avoid picking up a file early (due to, say, network glitches).
The following example shows how to configure a `SmbLastModifiedFileListFilter`:

[source, java]
----
@Bean
public SmbLastModifiedFileListFilter smbLastModifiedFileListFilter() {
SmbLastModifiedFileListFilter filter = new SmbLastModifiedFileListFilter();
filter.setAge(180);
return filter;
}
----

[[configuring-with-the-java-dsl]]
=== Configuring with the Java DSL

Expand Down
6 changes: 6 additions & 0 deletions src/reference/antora/modules/ROOT/pages/whats-new.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,9 @@ See xref:jdbc/message-store.adoc#jdbc-db-init[Initializing the Database] for mor

A new option `setCreateIndexes(boolean)` has been introduced in `AbstractConfigurableMongoDbMessageStore` to disable the auto indexes creation.
See xref:mongodb.adoc#mongodb-message-store[MongoDB Message Store] for an example.

[[x6.2-remote-files]]
=== Remote Files Support Changes

`FtpLastModifiedFileListFilter`, `SftpLastModifiedFileListFilter` and `SmbLastModifiedFileListFilter` have been introduced to allow files filtering based on a last-modified strategy respectively for `FTP`, `SFTP` and `SMB`.
See xref:ftp/inbound.adoc#ftp-inbound[FTP Inbound Channel Adapter], xref:sftp/inbound.adoc#sftp-inbound[SFTP Inbound Channel Adapter] and xref:smb.adoc#smb-inbound[SMB Inbound Channel Adapter].

0 comments on commit dbc3e1d

Please sign in to comment.