Class GenericFileEndpointOptions

Assembly: redb.Route.GenericFile.dll

Base endpoint options shared by all file-based transports (local file, SFTP, FTP).
Provides consumer polling, post-processing, idempotency, done-file, and producer write options.

public abstract class GenericFileEndpointOptions : EndpointOptions

Inheritance

Object→EndpointOptions→GenericFileEndpointOptions

Derived

Inherited Members

Properties

AllowNullBody

If true, allow writing an empty file when body is null. (default: false)

public bool AllowNullBody { get; set; }

AntExclude

Ant-style patterns over the relative path that drop a file: archive/,/*.tmp.

public string AntExclude { get; set; }

AntFilterCaseSensitive

Whether and respect case. (default: true,

public bool AntFilterCaseSensitive { get; set; }

AntInclude

Ant-style patterns over the path relative to the polled directory, several separated by

public string AntInclude { get; set; }

AppendChars

Characters to append after each Append write (e.g. "\n"). Empty = nothing.

public string AppendChars { get; set; }

AutoCreate

If true, create the target directory if it doesn't exist. (default: true)

public bool AutoCreate { get; set; }

BackoffErrorThreshold

Number of consecutive failed polls (the poll itself threw — e.g. the server is down) that arms the

public int BackoffErrorThreshold { get; set; }

BackoffIdleThreshold

Number of consecutive idle polls (a poll that created no exchange) that arms the backoff skip.

public int BackoffIdleThreshold { get; set; }

BackoffMultiplier

How many subsequent polls to skip once a backoff threshold is reached. 0 = backoff disabled (default).

public int BackoffMultiplier { get; set; }

BackoffOnFailedExchanges

Extension beyond Camel parity (default false): count a poll that created at least one exchange whose

public bool BackoffOnFailedExchanges { get; set; }

Charset

File encoding (default: "utf-8").

public string Charset { get; set; }

Delay

Polling delay in milliseconds between directory scans. (default: 500)

public int Delay { get; set; }

Delete

If true, delete the file after successful processing. (default: false)

public bool Delete { get; set; }

DoneFileName

Pattern for a "done" marker file. If set, the consumer waits for this marker before processing.

public string DoneFileName { get; set; }

EagerDeleteTargetFile

If true, delete the target file before writing when using Override strategy. (default: true)

public bool EagerDeleteTargetFile { get; set; }

Exclude

Glob pattern to exclude files (e.g. ".tmp,."). Empty = exclude nothing.

public string Exclude { get; set; }

FileExist

Strategy when the target file already exists. (default: Override)

public GenericFileExistStrategy FileExist { get; set; }

FileName

Dynamic file name for the producer. Supports ${header.xxx} expressions.

public DynamicValue<string>? FileName { get; set; }

Filter

Name of an in the route registry (filter=#myFilter),

[RegistryReference(typeof(IGenericFileFilter))]
public string Filter { get; set; }

FilterDirectory

Condition deciding whether a subdirectory is walked into, evaluated against the directory's

public string FilterDirectory { get; set; }

FilterFile

Condition deciding whether a polled file is taken, evaluated against the file's headers

public string FilterFile { get; set; }

FilterInstance

The filter bean itself, put here by the component once it resolved from

public IGenericFileFilter? FilterInstance { get; set; }

Idempotent

If true, skip files that have already been processed (tracked by idempotent key). (default: false)

public bool Idempotent { get; set; }

IdempotentKey

Expression for the idempotent key. Default uses path + last modified + size.

public string IdempotentKey { get; set; }

Include

Glob pattern to include files (e.g. ".csv"). Multiple patterns: ".csv,*.json". Empty = all files.

public string Include { get; set; }

InitialDelay

Initial delay before the first poll in milliseconds. (default: 0)

public int InitialDelay { get; set; }

MaxDepth

Maximum recursion depth when Recursive=true. 0 = unlimited. (default: 0)

public int MaxDepth { get; set; }

MaxMessagesPerPoll

Maximum number of files to pick up per poll. 0 = unlimited. (default: 0)

public int MaxMessagesPerPoll { get; set; }

MinAge

Minimum file age in milliseconds before the file is eligible for pickup. (default: 0)

public long MinAge { get; set; }

MinDepth

Minimum recursion depth. Files at shallower levels are skipped. (default: 0)

public int MinDepth { get; set; }

MoveExisting

Strategy when the target file in MoveTo already exists. (default: Override)

public GenericFileExistStrategy MoveExisting { get; set; }

MoveTo

Directory to move files to after successful processing. Supports the file keys of (\({file:name}</code>, <code>\){file:ext}).

public string MoveTo { get; set; }

Noop

If true, the file is not moved or deleted after processing (read-only mode). (default: false)

public bool Noop { get; set; }

PreMove

Directory to move files to BEFORE processing (pre-move for concurrency safety).

public string PreMove { get; set; }

Recursive

Whether to recurse into subdirectories. (default: false)

public bool Recursive { get; set; }

SortBy

Sort order for polled files. (default: None)

public GenericFileSortBy SortBy { get; set; }

StreamBody

If true, the consumer sets the exchange body to a Stream instead of reading

public bool StreamBody { get; set; }

TempFileName

Full temp file name, in the target's directory. Overrides TempPrefix if set. The file keys read the target file

public string TempFileName { get; set; }

TempPrefix

Prefix for the temp file during write (e.g. ".redb_"). Empty = write directly.

public string TempPrefix { get; set; }

Methods

ValidateCommon()

Validates common file endpoint options. Subclasses should call this from their Validate() method.

protected void ValidateCommon()