writeFiles
Processor that produces files over different protocols.
The target file name can be specified in the following ways:
-
The optional configuration property
outputFileName
. -
The original file name from the exchange property
fileName
ifoutputFileName
is not set. -
An auto-generated file name if none of the above are set.
To avoid consumers reading in-progress files, atomic writes are supported by writing to temporary files that are renamed to the target file names once the writes finish. To enable this feature, the optional configuration property outputTempFileNameExpr
is required together with a predefined target file name, either by setting outputFileName
or the exchange property fileName
explicitly.
outputTempFileNameExpr
is an expression evaluated in the standard expression context with the property targetFileName
added to the context.
The temp file name must not match any patterns used for consuming the target files. It’s recommended to include the targetFileName
in the expression to keep it unique. For example, given a target file named ../path/target.xml
:
-
The expression
targetFileName + '.tmp'
would result in a temp file name of../path/target.xml.tmp
. -
The expression
'tmp/' + targetFileName
would result in a temp file name of../path/tmp/target.xml
.
Properties
Name | Summary |
---|---|
|
The FileTransferProtocol to use. Can be one of the following:
|
|
Host name or IP. Not relevant for |
|
Port to override the default. Not relevant for |
|
A secret key that the server uses to look up the credentials needed to perform the authentication. Not relevant for |
|
Location where the file is written. The last element of the path must be a directory. |
|
Name to use when creating the files. Optional. |
|
Temporary file name to use before the file write is complete. The name is evaluated from an expression. Optional. |
|
Whether parent directories of the file to write are created automatically if they are missing. Optional and |
|
How long the processor will wait for a successful file creation. |
|
Whether written files should be passed to the output of the processor. Defaults to |
|
Optional, descriptive name for the processor. |
|
Required identifier of the processor, unique across all processors within the flow. Must be between 3 and 30 characters long; contain only lower and uppercase alphabetical characters (a-z and A-Z), numbers, dashes ("-"), and underscores ("_"); and start with an alphabetical character. In other words, it adheres to the regex pattern |
|
Optional set of custom properties in a simple jdk-format, that are added to the message exchange properties before processing the incoming payload. Any existing properties with the same name will be replaced by properties defined here. |
|
Whether the incoming payload is available for error processing on failure. Defaults to |
Sub-builders
Name | Summary |
---|---|
Strategy for providing message processing hints to the server. Optional. |
|
Strategy for describing the external system integration. Optional. |
|
Strategy for configuring the processor’s circuit breaker. Optional. |
|
Strategy for describing how a processor’s message is logged on the server. |
|
Strategy for archiving payloads. |
|
Strategy that customizes the conversion of an incoming payload by a processor (e.g., string to object). Should be used when the processor’s default conversion logic cannot be used. |
Details
Authentication
The authenticationConfigKey
property supports secrets of type UserNameAndPassword and SshPrivateKey.
See the Secret Types documentation for formatting details.