Class SftpConsumer
SFTP consumer. Polls a remote directory at regular intervals via SSH.NET,
applies glob filters, idempotency, pre/post-move, and processes each file via the route processor.
After successful processing, applies the configured post-processing strategy (noop/delete/move).
Supports recursive directory scanning, min/max age filtering, done-file markers,
and automatic reconnection.
public sealed class SftpConsumer : RemoteFileConsumer<SftpEndpointOptions>, IConsumer
Inheritance
Implements
Inherited Members
DrainableConsumer.AwaitRunTask(),DrainableConsumer.ConsumerEndpoint,DrainableConsumer.ConsumerName,DrainableConsumer.DecrementInflight(),DrainableConsumer.Endpoint,DrainableConsumer.IncrementInflight(),DrainableConsumer.Logger,DrainableConsumer.OnStarting(CancellationToken),DrainableConsumer.OnStopAccepting(),DrainableConsumer.OnStopped(),DrainableConsumer.Processor,DrainableConsumer.ProcessWithTracking(IExchange, TransportSpan, CancellationToken),DrainableConsumer.ProcessWithTracking(IExchange, CancellationToken),DrainableConsumer.RunAsync(CancellationToken, CancellationToken),DrainableConsumer.Start(CancellationToken),DrainableConsumer.Stop(CancellationToken)
Properties
BasePath
Base path for file operations (directory for local, remote path for SFTP/FTP).
protected override string BasePath { get; }
ConsumerName
Display name for logging (e.g. "kafka:orders", "file:/tmp/in").
protected override string ConsumerName { get; }
Methods
SetExchangeHeaders(IMessage, GenericFileInfo, string)
Sets protocol-specific headers on the exchange message.
protected override void SetExchangeHeaders(IMessage message, GenericFileInfo file, string workPath)