SFTP Connector 2.5 Reference | MuleSoft Documentation
# SFTP Connector 2.5 Reference
Anypoint Connector for SFTP (SFTP Connector) provides access to files and folders on a SFTP server.
Release Notes: SFTP Connector Release Notes
PPK (Private Key) file does not support identity file for SFTP Connector.   
---  
## Configurations
### Default Configuration
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
The name for this configuration. Connectors reference the configuration with this name.  
**Connection** |  SFTP Connection |  The connection types to provide to this configuration.  
**Time Between Size Check** |  Wait time between size checks to determine if a file is ready to read. This allows a file write to complete before processing. If no value is provided, the check will not be performed. When enabled, Mule waits the specified time between calls and performs two size checks. If both checks return the same value, the file is ready to read. This attribute works in tandem with **Time Between Size Check Unit**.  
**Time Between Size Check Unit** |  Enumeration, is one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  A TimeUnit that qualifies the **Time Between Size Check** attribute. |  `MILLISECONDS`  
**Expiration Policy** |  Expiration Policy |  Configures the minimum amount of time that a dynamic configuration instance can remain idle before the runtime considers it eligible for expiration. This does not mean that the platform will expire the instance at the exact moment that it becomes eligible. Mule runtime engine purges the instances when it sees it fit.  
#### Connection Types
##### SFTP Connection
A file system provider that provides instances of SFTP file system from instances of SFTP Connector.
###### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Working Directory** |  The directory designated as the root of every relative path used with this connector. If not provided, it defaults to the remote server default. Define a working directory because some SFTP servers do not return output for the present working directory command. While the behavior of the SFTP server side cannot be controlled, setting this value mitigates such scenario.  
**Preferred Authentication Methods** |  Array of enumeration is one of:
  * GSSAPI_WITH_MIC
  * PUBLIC_KEY
  * PASSWORD

|  Set of authentication methods used by the SFTP client. Valid values are: `GSSAPI_WITH_MIC`, `PUBLIC_KEY`, and `PASSWORD`.  
**Known Hosts File** |  If provided, the client validates the server’s key against the one in the referenced file. If the server key doesn’t match the one in the file, the connection will be aborted.  
**Sftp Proxy Config** |  SFTP Proxy Config |  If provided, a proxy will be used for the connection.  
**Connection Timeout** |  A scalar value representing the amount of time to wait before a connection attempt times out. This attribute works in tandem with **Connection Timeout Unit**.  
**Connection Timeout Unit** |  Enumeration is one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  A time unit that qualifies the **Connection Timeout** attribute.  
**Response Timeout** |  A scalar value representing the amount of time to wait before an SFTP request times out. This corresponds to the internal `sftp-client-cmd-timeout` property on the `org.apache.sshd.sftp.client.impl.AbstractSftpClient` AbstractSftpClient, which is applied by `DefaultSftpClient` when sending SFTP commands. Defaults to 30 seconds (the default of the SFTP client), but can be overridden here. This attribute works in tandem with **Response Timeout Unit**.  
**Response Timeout Unit** |  Enumeration is one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  A TimeUnit that qualifies the **Response Timeout Unit** attribute.  
The SFTP server host, such as `www.mulesoft.com`, `localhost`, or `192.168.0.1`, and so on.  
The port number of the SFTP server to connect on.  
Username for the SFTP Server. Required if the server is authenticated.  
Password for the SFTP Server. Required if the server is authenticated.  
**Passphrase** |  The passphrase (password) for the identity file if required. This parameter is ignored if identity file is not provided.  
**Identity File** |  An identity file location for a PKI private key. ssh-keygen’s OpenSSH PKI format is not accepted. You can use argument "-m PEM".  
**PRNG Algorithm** |  Enumeration is one of:
  * AUTOSELECT
  * NativePRNG
  * SHA1PRNG
  * NativePRNGBlocking
  * NativePRNGNonBlocking

|  The Pseudo Random Number Generator Algorithm to use.  
**Security Configuration** |  Security Configuration |  Provides support to override security related configurations like Ciphers, MACs, Kex Algorithms, etc.  
**Reconnection** |  |  When the application is deployed, a connectivity test is performed on all connectors. If set to `true`, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.  
**Pooling Profile** |  Pooling Profile |  Characteristics of the connection pool.  
## Supported Operations
  * Create Directory


### Associated Sources
  * On New or Updated File


## Operations
### Copy
`<sftp:copy>`
Copies the file or directory specified in **Source Path** into the **Target Path**. The source path can be either a file or a directory. If it points to a directory, then it is copied recursively.
If the target path doesn’t exist, and neither does its parent, then a parent folder is created if **Create parent directories** is set to `true`. If **Create parent directories** is set to `false`, then an `SFTP:ILLEGAL_PATH` error is thrown.
If **Overwrite** is set to `true` and the target file already exists, then the target file is overwritten. Otherwise, an `SFTP:FILE_ALREADY_EXISTS` error is thrown.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  The name of the configuration to use.  
**Source Path** |  The path to the file to copy.  
**Target Path** |  The target directory for where to copy the file.  
**Create Parent Directories** |  Whether or not to attempt to create parent directories if they don’t exist.  
Whether or not to overwrite the file if the target destination already exists.  
Rename the copied file. If this value is not provided, the original file name is kept.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  A retry strategy in case of connectivity errors.  
### For Configurations
  * Default Configuration


#### Throws
  * SFTP:RETRY_EXHAUSTED
  * SFTP:ILLEGAL_PATH
  * SFTP:FILE_ALREADY_EXISTS
  * SFTP:CONNECTIVITY


### Create Directory
`<sftp:create-directory>`
Creates a new directory using the value in the **Directory Path** field.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  The name of the configuration to use.  
**Directory Path** |  The new directory’s name.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  A retry strategy in case of connectivity errors.  
### For Configurations
  * Default Configuration


#### Throws
  * SFTP:RETRY_EXHAUSTED
  * SFTP:ILLEGAL_PATH
  * SFTP:ACCESS_DENIED
  * SFTP:FILE_ALREADY_EXISTS
  * SFTP:CONNECTIVITY


### Delete
`<sftp:delete>`
Deletes the file that the path field points to, provided that the file is not locked.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  The name of the configuration to use.  
The path to the file to delete.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  A retry strategy in case of connectivity errors.  
### For Configurations
  * Default Configuration


#### Throws
  * SFTP:RETRY_EXHAUSTED
  * SFTP:ILLEGAL_PATH
  * SFTP:ACCESS_DENIED
  * SFTP:CONNECTIVITY
|  A retry strategy in case of connectivity errors.  
### For Configurations
  * Default Configuration


#### Throws
  * SFTP:RETRY_EXHAUSTED
  * SFTP:ILLEGAL_PATH
  * SFTP:ACCESS_DENIED
  * SFTP:FILE_ALREADY_EXISTS
  * SFTP:CONNECTIVITY


### Delete
`<sftp:delete>`
Deletes the file that the path field points to, provided that the file is not locked.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  The name of the configuration to use.  
The path to the file to delete.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  A retry strategy in case of connectivity errors.  
### For Configurations
  * Default Configuration


#### Throws
  * SFTP:RETRY_EXHAUSTED
  * SFTP:ILLEGAL_PATH
  * SFTP:ACCESS_DENIED
  * SFTP:CONNECTIVITY


### List
`<sftp:list>`
Lists all the files in the **Directory Path** depending on the rules in the File Matching Rules field.
If the listing encounters a directory, the output list will include its contents, depending on the value of the **Recursive** field.
If **Recursive** is set to the `true` value, but a found directory is rejected by the rules in the **File Matching Rules** field, then recursion does not occur in the directory.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  The name of the configuration to use.  
**Directory Path** |  The directory path to list.  
Whether to include the contents of subdirectories. Defaults to `false`.  
**File Matching Rules** |  A matcher used to filter the output list.  
**Time Between Size Check** |  Wait time between size checks to determine if a file is ready to read.  
**Time Between Size Check Unit** |  Enumeration is one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  Time unit to use in the wait time between size checks.  
**Target Variable** |  The name of a variable to store the operation’s output.  
**Target Value** |  An expression to evaluate against the operation’s output and store the expression outcome in the target variable.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  A retry strategy in case of connectivity errors.  
#### Output
Array of Message of [String] payload and [SFTP File Attributes] attributes. The payload contains the element path.  
---  
### For Configurations
  * Default Configuration


#### Throws
  * SFTP:ILLEGAL_PATH
  * SFTP:ACCESS_DENIED


### Move
`<sftp:move>`
Moves the file or directory from the **Source Path** into the **Target Path**. The source path can be either a file or a directory. If it points to a directory, then it will be moved recursively.
If the target path doesn’t exist, and neither does its parent, then a parent folder is created if **Create parent directories** is set to `true`. If **Create parent directories** is set to `false`, then an `SFTP:ILLEGAL_PATH` error is thrown.
If the target file already exists, then it will be overwritten if **Overwrite** is set to `true`. If **Overwrite** is set to `false`, an `SFTP:FILE_ALREADY_EXISTS` error will be thrown.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  The name of the configuration to use.  
**Source Path** |  The path to the file to copy.  
**Target Path** |  The target directory.  
**Create Parent Directories** |  Whether or not to attempt to create any parent directories that don’t exist.  
Whether or not to overwrite the file if the target destination already exists.  
Name of the moved file. If a value is not provided, the original file name is kept.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  A retry strategy in case of connectivity errors.  
#### For Configurations.
  * Default Configuration


#### Throws
  * SFTP:RETRY_EXHAUSTED
  * SFTP:ILLEGAL_PATH
  * SFTP:FILE_ALREADY_EXISTS
  * SFTP:CONNECTIVITY


### Read
`<sftp:read>`
Obtains the content and metadata of a file at a given path. The operation itself returns a message whose payload is an input stream with the file’s content, and the metadata is represented as an `SftpFileAttributes` object that’s placed as the message `Message#getAttributes()` attributes.
If the lock parameter is set to `true`, then a file system level lock is placed on the file until the input stream this operation returns is closed or fully consumed. Because the lock is provided by the host file system, its behavior might change depending on the SFTP server or its file system. Take that into consideration before relying on this lock.
This method also makes a best effort to determine the MIME type of the file being read by using the file’s extension to make an educated guess. You can also use the output **Encoding** and output **MIME Type** optional parameters to force the encoding and MIME type.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  The name of the configuration to use.  
The path to the file to read.  
Whether or not to lock the file. Defaults to `false`.  
**Time Between Size Check** |  Wait time between size checks to determine if a file is ready to read.  
**Time Between Size Check Unit** |  Enumeration is one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  Time unit to use in the wait time between size checks.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Streaming Strategy** | 
  * Repeatable In Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configure whether to use repeatable streams.  
**Target Variable** |  The name of a variable to store the operation’s output.  
**Target Value** |  An expression to evaluate against the operation’s output and store the expression outcome in the target variable.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  A retry strategy in case of connectivity errors.  
#### Output
Attributes Type |  SFTP File Attributes  
---|---  
### For Configurations
  * Default Configuration


#### Throws
  * SFTP:FILE_LOCK
  * SFTP:RETRY_EXHAUSTED
  * SFTP:ILLEGAL_PATH
  * SFTP:ACCESS_DENIED
  * SFTP:CONNECTIVITY


### Rename
`<sftp:rename>`
Renames the file to which the path points to the value provided in the **New Name** parameter. This argument should not contain any path separator, or an `SFTP:ILLEGAL_PATH` error will be thrown.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  The name of the configuration to use.  
The path to the file to rename.  
The file’s new name.  
Whether or not to overwrite the file if the target destination already exists.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  A retry strategy in case of connectivity errors.  
### For Configurations
  * Default Configuration


#### Throws
  * SFTP:RETRY_EXHAUSTED
  * SFTP:ILLEGAL_PATH
  * SFTP:ACCESS_DENIED
  * SFTP:FILE_ALREADY_EXISTS
  * SFTP:CONNECTIVITY


### Write
`<sftp:write>`
Writes the content into the file the path points to.
If the directory to which the file is attempting to be written doesn’t exist, then the operation will either throw an `SFTP:ILLEGAL_PATH` error, or create a new folder, depending on the value of **Create parent directories**. If the file already exists, then the behavior depends on the supplied mode.
This operation also supports locking depending on the value of the lock argument, and follows the same rules and considerations as described in the read operation.
An additional check is performed if the file already exists, thus the FTP `STAT` command is executed before writing the file.   
---  
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  The name of the configuration to use.  
The path of the file to write.  
The content to write into the file. Defaults to the current Message payload.  
**Create Parent Directories** |  Whether or not to attempt to create any parent directories that don’t exist.  
Whether or not to lock the file. Defaults to `false`.  
**Write Mode** |  Enumeration is one of:
  * OVERWRITE
  * APPEND
  * CUSTOM_APPEND
  * CREATE_NEW
### Write
`<sftp:write>`
Writes the content into the file the path points to.
If the directory to which the file is attempting to be written doesn’t exist, then the operation will either throw an `SFTP:ILLEGAL_PATH` error, or create a new folder, depending on the value of **Create parent directories**. If the file already exists, then the behavior depends on the supplied mode.
This operation also supports locking depending on the value of the lock argument, and follows the same rules and considerations as described in the read operation.
An additional check is performed if the file already exists, thus the FTP `STAT` command is executed before writing the file.   
---  
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  The name of the configuration to use.  
The path of the file to write.  
The content to write into the file. Defaults to the current Message payload.  
**Create Parent Directories** |  Whether or not to attempt to create any parent directories that don’t exist.  
Whether or not to lock the file. Defaults to `false`.  
**Write Mode** |  Enumeration is one of:
  * OVERWRITE
  * APPEND
  * CUSTOM_APPEND
  * CREATE_NEW

|  A `FileWriteMode`.
  * OVERWRITE If the file to be written exists, then overwrite it.
  * APPEND If the file to be written exists, then append the content to that file.
  * CUSTOM_APPEND If the file to be written using the `CUSTOM` write strategy exists, then append the content to that file.
  * CREATE_NEW Create a file and raise an error if the file exists.

  
**Write Strategy** |  Enumeration, one of:
  * STANDARD
  * CUSTOM

|  Strategy to write the file.
  * STANDARD The standard write function is used where the file write mode is honored.
  * CUSTOM A custom write function is used to write to files where offset is manually calculated.

  
**Buffer Size For Write Strategy** |  Enumeration, one of:
  * BUFFER_SIZE_1KB
  * BUFFER_SIZE_2KB
  * BUFFER_SIZE_4KB
  * BUFFER_SIZE_8KB
  * BUFFER_SIZE_16KB

|  Buffer size for the custom write. |  `BUFFER_SIZE_8KB`  
**Config Ref** |  ConfigurationProvider |  Configuration name to execute the write strategy.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  A retry strategy in case of connectivity errors.  
### For Configurations
  * Default Configuration


#### Throws
  * SFTP:FILE_LOCK
  * SFTP:RETRY_EXHAUSTED
  * SFTP:ILLEGAL_PATH
  * SFTP:ACCESS_DENIED
  * SFTP:ILLEGAL_CONTENT
  * SFTP:FILE_ALREADY_EXISTS
  * SFTP:CONNECTIVITY
  * SFTP:FILE_DOESNT_EXIST


## Sources
### On New or Updated File
`<sftp:listener>`
Polls a directory and looks for files that have been created in it. One message is generated for each file that is found.
The key part of this functionality is how to determine that a file is actually new. There are three strategies for that:
  * Set the **Auto delete** parameter to `true` to delete each file after it is processed, which causes all files obtained in the next poll to be necessarily new.
  * Set the **Move to directory** parameter to move each file to a different directory after it is processed, which achieves the same effect as **Auto delete** but without losing the file.
  * Use **Watermark enabled** to pick only files that have been created or updated after the last poll was executed.


You can also use a matcher for additional filtering of files.
The **On New Or Updated File** source ignores files that return with an empty attributes list. The list can be empty if the modification time (MDTM) is not enabled by the SFTP server or if the server returns an error when listing the attributes.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  The name of the configuration to use.  
The directory in which polled files are contained.  
Whether or not to also poll files contained in sub directories.  
A matcher used to filter events on files that do not meet the file matching criteria.  
**Watermark Enabled** |  Controls whether or not to do watermarking, and if so, if the watermark should consider the file’s modification or creation timestamps. Enable this field to have the connector pick only files that were created or updated after the completion of the latest poll.  
**Time Between Size Check** |  Wait time (in milliseconds) between size checks to determine if a file is ready to read. This allows a file write to complete before processing. When enabled, Mule performs two size checks, waiting the specified time between calls. If both checks return the same value, the file is ready to read. You can disable this feature by omitting a value.  
**Time Between Size Check Unit** |  Enumeration is one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  A TimeUnit which qualifies the **Time between size check** attribute.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Primary Node Only** |  Whether this source should be executed only on the primary node when running in a cluster.  
**Scheduling Strategy** |  scheduling-strategy |  Configures the scheduler that triggers the polling.  
**Streaming Strategy** | 
  * Repeatable In Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configure whether to use repeatable streams.  
**Redelivery Policy** |  Redelivery Policy |  Defines a policy for processing the redelivery of the same message.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  A retry strategy in case of connectivity errors. The source stops polling if the Reconnect strategy fails. Use the Reconnect Forever strategy to run the source indefinitely.  
**Auto Delete** |  Whether to delete each file after processing.  
**Move To Directory** |  If provided, each processed file will be moved to a directory that is pointed to by this path.  
This parameter works in tandem with **Move to directory**. Use this parameter to enter the name of the directory under which to move the file. Do not set this parameter if **Move to directory** hasn’t also been set.  
**Apply Post Action When Failed** |  Specifies whether any of the post actions (**Auto delete** and **Move to directory**) should also be applied in case the file fails to be processed. If set to `false`, no failed files will be moved or deleted.  
Enables you to overwrite the target file when the destination file has the same name.  
#### Output
Attributes Type |  SFTP File Attributes  
---|---  
### For Configurations
  * Default Configuration


## Types
### SFTP Proxy Config
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Enumeration is of:
  * SOCKS5

  
### Security Configuration
Configuring security settings using the SSH Config Override File means you accept the shared responsibilities documentation.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**SSH Config Override File** |  Path to the file with the SSH override configurations. It supports the following configs:
  * `KexAlgorithms` Specifies the comma separated list of key exchange algorithms.
  * `Ciphers` Specifies the comma separated list of symmetric ciphers.
  * `HostKeyAlgorithms` Specifies the comma separated list of host key signature algorithms.
  * `MACs` Specifies the comma separated list of message authentication codes.

You define the keys in the file you need to override, defaults are taken for the remaining keys.  
### Reconnection
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Fails Deployment** |  When the application is deployed, a connectivity test is performed on all connectors. If set to `true`, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.  
**Reconnection Strategy** | 
  *   * Reconnect Forever
## Types
### SFTP Proxy Config
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Enumeration is of:
  * SOCKS5

  
### Security Configuration
Configuring security settings using the SSH Config Override File means you accept the shared responsibilities documentation.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**SSH Config Override File** |  Path to the file with the SSH override configurations. It supports the following configs:
  * `KexAlgorithms` Specifies the comma separated list of key exchange algorithms.
  * `Ciphers` Specifies the comma separated list of symmetric ciphers.
  * `HostKeyAlgorithms` Specifies the comma separated list of host key signature algorithms.
  * `MACs` Specifies the comma separated list of message authentication codes.

You define the keys in the file you need to override, defaults are taken for the remaining keys.  
### Reconnection
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Fails Deployment** |  When the application is deployed, a connectivity test is performed on all connectors. If set to `true`, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.  
**Reconnection Strategy** | 
  *   * Reconnect Forever

|  The reconnection strategy to use. It overrides the `Fails Deployment` field. So if the reconnection strategy is set to `reconnect-forever`, the deployment never fails.  
### Reconnect
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Frequency | How often (in milliseconds) to reconnect.  
How many reconnection attempts to make.  
blocking | If `false`, the reconnection strategy runs in a separate, non-blocking thread.  
### Reconnect Forever
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
Frequency | How often (in milliseconds) to reconnect.  
blocking | If `false`, the reconnection strategy runs in a separate, non-blocking thread.  
### Pooling Profile
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Max Active** |  Controls the maximum number of connections that can be active at one time. When set to a negative value, there is no limit to the number of components that can be active at one time. When **Max active** is exceeded, the pool is exhausted.  
Controls the maximum number of connections that can sit idle in the pool at any one time. When set to a negative value, there is no limit to the number of connections that can be idle at one time.  
Specifies the number of milliseconds to wait for a pooled component to become available when the pool is exhausted and the **Exhausted action** is set to `WHEN_EXHAUSTED_WAIT`.  
**Min Eviction Millis** |  Determines the minimum amount of time an object can sit idle in the pool before it is eligible for eviction. When non-positive, no objects will be evicted from the pool due to idle time alone.  
**Eviction Check Interval Millis** |  Specifies the number of milliseconds between runs of the object evictor. When non-positive, no object evictor is executed.  
**Exhausted Action** |  Enumeration is one of:
  * WHEN_EXHAUSTED_GROW
  * WHEN_EXHAUSTED_WAIT
  * WHEN_EXHAUSTED_FAIL

|  Specifies the behavior of the Mule component pool when the pool is exhausted. Possible values are:
  * `WHEN_EXHAUSTED_FAIL`, which will throw a `NoSuchElementException`. * `WHEN_EXHAUSTED_WAIT`, which will block by invoking `Object.wait(long)` until a new or idle object is available.
  * `WHEN_EXHAUSTED_GROW`, which will create a new Mule instance and return it, essentially making `maxActive` meaningless. If a positive `maxWait` value is supplied, it will block for, at most, the specified number of milliseconds, after which a `NoSuchElementException` will be thrown. If `maxThreadWait` is a negative value, it will block indefinitely.

|  WHEN_EXHAUSTED_GROW  
**Initialisation Policy** |  Enumeration is one of:
  * INITIALISE_NONE
  * INITIALISE_ONE
  * INITIALISE_ALL

|  Determines how components in a pool should be initialized. The possible values are:
  * INITIALISE_NONE, which means no components will be loaded into the pool at startup.
  * INITIALISE_ONE, which will load one initial component into the pool at startup.
  * INITIALISE_ALL, which will load all components in the pool at startup.

|  INITIALISE_NONE  
### Expiration Policy
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Max Idle Time** |  A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it’s considered eligible for expiration.  
Enumeration is one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  A time unit that qualifies the **Max idle time** attribute.  
### SFTP File Attributes
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Regular File**  
**Symbolic Link**  
**Permissions**  
### Matcher
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Timestamp Since** |  Files created before this date are rejected. Any timezone specification in this value is ignored and the Mule server’s time zone is used instead.  
**Timestamp Until** |  Files created after this date are rejected. Any timezone specification in this value is ignored and the Mule server’s time zone is used instead.  
**Not Updated In The Last** |  Minimum time that should pass since a file was last updated to not be rejected. This attribute works in tandem with **Time unit**.  
**Updated In The Last** |  Maximum time that should pass from when a file was last updated to not be rejected. This attribute works in tandem with **Time unit**.  
Enumeration is one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  A **Not updated in the last** attributes. |  MILLISECONDS  
**Case Sensitive** |  Enables you to configure an external file system matcher as case sensitive or insensitive.  
**Filename Pattern** |  A matching pattern to apply on the file name. Supports glob expressions (default) and regex expressions. To use any of the expressions set a prefix, for example, `glob:*.{java, js}` or `regex:[0-9]test.csv`.  
**Path Pattern** |  A matching pattern to apply on the file path  
**Directories** |  Enumeration is one of:
  * REQUIRE
  * INCLUDE
  * EXCLUDE

|  Match only if the file is a directory  
**Regular Files** |  Enumeration is one of:
  * REQUIRE
  * INCLUDE
  * EXCLUDE

|  Match only if the file is a regular file  
Enumeration is one of:
  * REQUIRE
  * INCLUDE
  * EXCLUDE
|  A **Not updated in the last** attributes. |  MILLISECONDS  
**Case Sensitive** |  Enables you to configure an external file system matcher as case sensitive or insensitive.  
**Filename Pattern** |  A matching pattern to apply on the file name. Supports glob expressions (default) and regex expressions. To use any of the expressions set a prefix, for example, `glob:*.{java, js}` or `regex:[0-9]test.csv`.  
**Path Pattern** |  A matching pattern to apply on the file path  
**Directories** |  Enumeration is one of:
  * REQUIRE
  * INCLUDE
  * EXCLUDE

|  Match only if the file is a directory  
**Regular Files** |  Enumeration is one of:
  * REQUIRE
  * INCLUDE
  * EXCLUDE

|  Match only if the file is a regular file  
Enumeration is one of:
  * REQUIRE
  * INCLUDE
  * EXCLUDE

|  Match only if the file is a symbolic link  
The minimum file size in bytes. Files smaller than the specified value are rejected.  
The maximum file size in bytes. Files larger than the specified value are rejected.  
### Repeatable In Memory Stream
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Initial Buffer Size** |  This is the amount of memory to allocate to consume the stream and provide random access to it. If the stream contains more data than can fit into this buffer, then it will be expanded according to the **Buffer size increment** attribute, with an upper limit of **Max in memory size**.  
**Buffer Size Increment** |  This is by how much the buffer size will be expanded if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, and that a `STREAM_MAXIMUM_SIZE_EXCEEDED` error will be raised when the buffer gets full.  
**Max Buffer Size** |  This is the maximum amount of memory to use. If more than the specified maximum is used, then a `STREAM_MAXIMUM_SIZE_EXCEEDED` error will be raised. A value lower or equal to zero means no limit.  
**Buffer Unit** |  Enumeration is one of: |  The unit in which all these attributes are expressed.  
### Repeatable File Store Stream
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Max In Memory Size** |  Defines the maximum memory that the stream should use to keep data in memory. If more than that is consumed then content is buffered on the disk.  
**Buffer Unit** |  Enumeration, one of: |  The unit in which maxInMemorySize is expressed  
### Redelivery Policy
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Max Redelivery Count** |  The maximum number of times a message can be redelivered and processed unsuccessfully before triggering process-failed-message  
**Use Secure Hash** |  Whether to use a secure hash algorithm to identify a redelivered message  
**Message Digest Algorithm** |  The secure hashing algorithm to use. If not set, the default is `SHA-256`.  
**Id Expression** |  Defines one or more expressions to use to determine when a message has been redelivered. This property may only be set if useSecureHash is false.  
**Object Store** |  ObjectStore |  The object store where the redelivery counter for each message will be stored.  
### Repeatable In Memory Iterable
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Initial Buffer Size** |  This is the number of instances initially allowed to be kept in memory in order to consume the stream and provide random access to it. If the stream contains more data than can fit into this buffer, then it will be expanded according to the **Buffer size increment** attribute, with an upper limit of **Max in memory size**. Default value is 100 instances.  
**Buffer Size Increment** |  How much the buffer size will expand if it exceeds its initial specified size. Setting a value of zero or lower means that the buffer should not expand, and that a `STREAM_MAXIMUM_SIZE_EXCEEDED` error will be raised when the buffer gets full. Default value is 100 instances.  
**Max in Memory Instances** |  This is the maximum amount of memory to use. If more than the maximum amount is used, then a `STREAM_MAXIMUM_SIZE_EXCEEDED` error will be raised. A value lower or equal to zero means no limit.  
### Repeatable File Store Iterable
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**In Memory Objects** |  The maximum number of instances to keep in memory. If more than the maximum is required, content starts to buffer to the disk.  
## See Also
MuleSoft Help Center