Samba component
The Samba component is able to connect to file servers that support the SMB/CIFS protocol (Windows File Sharing), both as a consumer (reading files) and producer (writing files).
Configuration
The Samba component has the following configuration options:
Property | Description |
---|---|
User Name | The name of the user account for the file server |
Password | The password that belongs to the user account for the file server |
Host Name | Url or ip address of the file server |
Move | Directory where files will be moved after processing |
Local Work Directory | Local temporary directory where copy files for processing. Used by consumer only. See remarks below. |
Port | Specify a custom tcp/ip port, by default 139 is used |
Domain | Specify the Windows domain user belongs to |
Read Lock | Specifies how to handle files that are currently in use by other processes. If set to none Dovetail will process the file regardless of it being in used by another process or not (this could lead to partial files if another file is writing to the file for example). Set to changed , Dovetail will monitor the file for a short period (around 1 second) before processing and will only process the file if it hasn't changed in that period. This is safer, but also slower since files aren't immediately picked up. |
Path | Path to the target directory |
Charset | Specifies the encoding of the file |
AutoCreate | If set to true , automatically create missing directories in the file path |
FileExist | What to do when a file with the same name already exists |
Recursive | Search for files in all the sub-directories as well |
Include | Used to include files, if the filename matches the regular expressions pattern |
Exclude | Used to exclude files, if the filename matches the regular expression pattern |
Delete File | If set to true , the file will be deleted after it is processed |
Initial Delay | Milliseconds to wait before polling the file/directory starts |
Delay | Milliseconds to wait before the next poll of the file/directory |
Remarks
Local Work Directory
when 'consuming', a local work directory can be used to store the remote file content directly in local files, to avoid loading the content into memory. This is beneficial, if you consume a very big remote file.Domain
The domain property could also be used if your user belongs to a specific windows domain.Path
The path property will indicate which share and which directory it should poll, like share/directory/.Path
if you include a/
at the end of the path, the Samba component will try to copy the whole file path and not the file name by itself!- Moving or deleting files:
When the DeleteFile is set to
true
, the Move option is ignored. When the DeleteFile property is not set totrue
, processed files will be moved to a .camel directory. ReadLock
This option is used while 'consuming', to only poll the files if it has exclusive read-lock on the file (i.e. the file is not in-progress or being written). The options arenone
orchanged
.Move
the default behavior is to create a .camel directory and move everything into that directory when it's processed.Recursive
Watch out when enabled! You must make sure that your Exclude pattern will ignore the directory were you place the processed files, otherwise you will end up with a infinite loop!- The component doesn't support DFS file shares.
- This component only supports version 1 of the SMB protocol.