Version: 17.01
Supported Since: 17.01
The File Egress Connector can be used to send messages with a file payload to a specified directory of local file system and same as the inject connectors, UltraESB-X has tested on Linux, Windows and OS-X environments and it is supposed to be able to operate in almost all the existing file systems.
When you are sending a message to a local directory, UltraESB-X server expects the file content as the message payload and file name to be specified at the connector’s or configuration or as a variable.
The sample use cases below depict an integration flow with File egress connector.
In this use case scenario, the requirement is to receive messages with a file payload through a NIO HTTP ingress connector and saving the payload file to a local directory. For statistics and monitoring purposes it’s required to extract out the client ID’s from a receiving message transport header and create a log specifying the extracted client ID value and the same client ID value should be prepended to the saving file name.
In order to implement above use case it is required to select the HTTP NIO Connector and Local File Connector dependencies from the connector list when creating the empty Ultra project. If the project is already created, it is required to add these dependencies via Component Registry. From Tools menu it is necessary to select Ultra Studio → Component Registry and from the Connectors list and Processors list, select above dependencies.
To implement above use case first it is required to create a new integration flow and add a HTTP NIO
IngressConnector and then it is required to provide the parameters to the HTTP NIO IngressConnector and
configure it. The incoming messages will contain a transport header denoting the sending client’s id (clientId
).
For monitoring purposes that client id will be logged using a Logger
processing element. As it is required to
prepend the same client id to the saving payload file name, in the next processing element it will be assigned
to a scope variable CLIENT_ID
using Add Variable
processing element. Finally it will be forwarded to a
File Egress Connector
element that has been configured inorder to save the payload to the configured location
in the local file system.
After filling out the required parameters, this configuration can be saved by clicking the Save button at the bottom of each element. Finally the complete flow with the configurations will be depicted as follows.
Scope Variable to Prepend to the File Name
parameter is configured with "@{message.var.CLIENT_ID}" to modify the file
name by attaching the client ID as the suffix for the original file name. Framework will replaced the "@{message.var.CLIENT_ID}"
from the value of the variable with name CLIENT_ID and the receiving timestamp will also be prepended to the file
name.
* marked fields are mandatory
File Path * |
Basic |
Destination directory where the payload file should be saved. |
File Name |
Basic |
All the other file name parts will be prepended to this property value and final file name will be generated. |
Append Mode |
Basic |
If this is enabled, the framework will append the current message payload if there is a file with same name in the given location. If this is disabled, existing file will be replaced by the new file at the file system destination path. |
Prepend Timestamp |
Basic |
Whether to prepend the received timestamp of the message to the file name. |
Scope Variable to Prepend to the File Name |
Basic |
Required to provide a scope variable that contains a string value. The value will be prepended to the final file name. |
Weight |
Fail-Over |
Weight for the Egress Connector if this Egress Connector is under a weighted Egress Load Balancer |
Egress Timeout |
Advanced |
Timeout value in milliseconds for the egress message |