Interface IPipeline<T>
Represents a running pipeline that can accept, process, and complete records.
public interface IPipeline<T> where T : PipelineRecord
Type Parameters
TThe pipeline record type processed by the pipeline.
Properties
Completion
Gets a Task that represents the asynchronous operation and completion of the pipeline.
Task Completion { get; }
Property Value
- Task
The task.
Methods
CompleteAsync()
Completes and shuts down the pipeline.
Task CompleteAsync()
Returns
- Task
A task that completes once the pipeline has fully shut down.
GetHealthStatus()
Gets the current health snapshot for the pipeline.
PipelineHealthStatus GetHealthStatus()
Returns
- PipelineHealthStatus
The current health snapshot.
GetOperationalSnapshot()
Gets the current operational snapshot for the pipeline.
PipelineOperationalSnapshot GetOperationalSnapshot()
Returns
- PipelineOperationalSnapshot
The current operational snapshot.
GetPerformanceSnapshot()
Gets the current performance snapshot for the pipeline.
PipelinePerformanceSnapshot GetPerformanceSnapshot()
Returns
- PipelinePerformanceSnapshot
The current performance snapshot.
GetRuntimeContext()
Gets the current distributed runtime context for the pipeline.
PipelineRuntimeContext GetRuntimeContext()
Returns
- PipelineRuntimeContext
The current runtime context.
GetStatus()
Gets the current runtime status snapshot for the pipeline.
PipelineStatus GetStatus()
Returns
- PipelineStatus
The current pipeline status.
PublishAsync(T)
Publishes a record into the pipeline using the default flow-control behavior.
Task PublishAsync(T record)
Parameters
recordTThe record to publish.
Returns
PublishAsync(T, PipelinePublishOptions)
Publishes a record into the pipeline with explicit flow-control behavior.
Task<PipelinePublishResult> PublishAsync(T record, PipelinePublishOptions options)
Parameters
recordTThe record to publish.
optionsPipelinePublishOptionsThe publish options to apply.
Returns
- Task<PipelinePublishResult>
The publish result.
StartPipelineAsync(CancellationToken)
Starts the pipeline runtime.
Task StartPipelineAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token used to cancel startup or runtime execution.
Returns
- Task
A task that completes once startup has finished.
Events
OnPartitionDrained
Event that is raised when a partition has fully drained.
event PipelinePartitionDrainedEventHandler OnPartitionDrained
Event Type
OnPartitionDraining
Event that is raised when a partition begins draining during rebalance.
event PipelinePartitionDrainingEventHandler OnPartitionDraining
Event Type
OnPartitionExecutionStateChanged
Event that is raised when partition execution state changes.
event PipelinePartitionExecutionStateChangedEventHandler OnPartitionExecutionStateChanged
Event Type
OnPartitionsAssigned
Event that is raised when partitions are assigned to the current worker.
event PipelinePartitionsAssignedEventHandler OnPartitionsAssigned
Event Type
OnPartitionsRevoked
Event that is raised when partitions are revoked from the current worker.
event PipelinePartitionsRevokedEventHandler OnPartitionsRevoked
Event Type
OnPipelineDeadLetterWriteFailed
Event that is raised when a dead-letter write attempt fails.
event PipelineDeadLetterWriteFailedEventHandler<T> OnPipelineDeadLetterWriteFailed
Event Type
OnPipelineFaulted
Event that is raised when the pipeline transitions into a faulted state.
event PipelineFaultedEventHandler OnPipelineFaulted
Event Type
OnPipelineRecordCompleted
Event that is raised when a message is completed in the pipeline.
event PipelineRecordCompletedEventHandler<T> OnPipelineRecordCompleted
Event Type
OnPipelineRecordDeadLettered
Event that is raised when a faulted record is preserved through the dead-letter path.
event PipelineRecordDeadLetteredEventHandler<T> OnPipelineRecordDeadLettered
Event Type
OnPipelineRecordFaulted
Event that is raised when a record faults while traversing the pipeline.
event PipelineRecordFaultedEventHandler<T> OnPipelineRecordFaulted
Event Type
OnPipelineRecordRetrying
Event that is raised when a record is scheduled for retry after a transient failure.
event PipelineRecordRetryingEventHandler<T> OnPipelineRecordRetrying
Event Type
OnPublishRejected
Event that is raised when a publish request is rejected.
event PipelinePublishRejectedEventHandler<T> OnPublishRejected
Event Type
OnSaturationChanged
Event that is raised when pipeline saturation state changes.
event PipelineSaturationChangedEventHandler OnSaturationChanged
Event Type
OnWorkerStarted
Event that is raised when a distributed worker starts.
event PipelineWorkerStartedEventHandler OnWorkerStarted
Event Type
OnWorkerStopping
Event that is raised when a distributed worker is stopping.
event PipelineWorkerStoppingEventHandler OnWorkerStopping