Class Pipeline<TPipelineRecord>
Implements the Pipelinez runtime for a specific record type.
public class Pipeline<TPipelineRecord> : IPipeline<TPipelineRecord> where TPipelineRecord : PipelineRecord
Type Parameters
TPipelineRecordThe pipeline record type processed by the runtime.
- Inheritance
-
Pipeline<TPipelineRecord>
- Implements
-
IPipeline<TPipelineRecord>
- Inherited Members
Properties
Completion
Gets a Task that represents the asynchronous operation and completion of the pipeline.
public Task Completion { get; }
Property Value
- Task
The task.
Logger
Gets the logger used by the pipeline runtime.
protected ILogger<Pipeline<TPipelineRecord>> Logger { get; }
Property Value
Methods
CompleteAsync()
Completes and shuts down the pipeline.
public Task CompleteAsync()
Returns
- Task
A task that completes once the pipeline has fully shut down.
GetHealthStatus()
Gets the current health snapshot for the pipeline.
public PipelineHealthStatus GetHealthStatus()
Returns
- PipelineHealthStatus
The current health snapshot.
GetOperationalSnapshot()
Gets the current operational snapshot for the pipeline.
public PipelineOperationalSnapshot GetOperationalSnapshot()
Returns
- PipelineOperationalSnapshot
The current operational snapshot.
GetPerformanceSnapshot()
Gets the current performance snapshot for the pipeline.
public PipelinePerformanceSnapshot GetPerformanceSnapshot()
Returns
- PipelinePerformanceSnapshot
The current performance snapshot.
GetRuntimeContext()
Gets the current distributed runtime context for the pipeline.
public PipelineRuntimeContext GetRuntimeContext()
Returns
- PipelineRuntimeContext
The current runtime context.
GetStatus()
Gets the current runtime status snapshot for the pipeline.
public PipelineStatus GetStatus()
Returns
- PipelineStatus
The current pipeline status.
New(string)
Creates a builder for a new pipeline with the specified name.
public static PipelineBuilder<TPipelineRecord> New(string pipelineName)
Parameters
pipelineNamestringThe logical name of the pipeline.
Returns
- PipelineBuilder<TPipelineRecord>
A pipeline builder for the specified record type.
PublishAsync(TPipelineRecord)
Publishes a record into the pipeline using the default flow-control behavior.
public Task PublishAsync(TPipelineRecord record)
Parameters
recordTPipelineRecordThe record to publish.
Returns
PublishAsync(TPipelineRecord, PipelinePublishOptions)
Publishes a record into the pipeline with explicit flow-control behavior.
public Task<PipelinePublishResult> PublishAsync(TPipelineRecord record, PipelinePublishOptions options)
Parameters
recordTPipelineRecordThe record to publish.
optionsPipelinePublishOptionsThe publish options to apply.
Returns
- Task<PipelinePublishResult>
The publish result.
StartPipelineAsync(CancellationToken)
Starts the pipeline runtime.
public 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.
public event PipelinePartitionDrainedEventHandler? OnPartitionDrained
Event Type
OnPartitionDraining
Event that is raised when a partition begins draining during rebalance.
public event PipelinePartitionDrainingEventHandler? OnPartitionDraining
Event Type
OnPartitionExecutionStateChanged
Event that is raised when partition execution state changes.
public event PipelinePartitionExecutionStateChangedEventHandler? OnPartitionExecutionStateChanged
Event Type
OnPartitionsAssigned
Event that is raised when partitions are assigned to the current worker.
public event PipelinePartitionsAssignedEventHandler? OnPartitionsAssigned
Event Type
OnPartitionsRevoked
Event that is raised when partitions are revoked from the current worker.
public event PipelinePartitionsRevokedEventHandler? OnPartitionsRevoked
Event Type
OnPipelineDeadLetterWriteFailed
Event that is raised when a dead-letter write attempt fails.
public event PipelineDeadLetterWriteFailedEventHandler<TPipelineRecord>? OnPipelineDeadLetterWriteFailed
Event Type
- PipelineDeadLetterWriteFailedEventHandler<TPipelineRecord>
OnPipelineFaulted
Event that is raised when the pipeline transitions into a faulted state.
public event PipelineFaultedEventHandler? OnPipelineFaulted
Event Type
OnPipelineRecordCompleted
Event that is raised when a message is completed in the pipeline.
public event PipelineRecordCompletedEventHandler<TPipelineRecord>? OnPipelineRecordCompleted
Event Type
- PipelineRecordCompletedEventHandler<TPipelineRecord>
OnPipelineRecordDeadLettered
Event that is raised when a faulted record is preserved through the dead-letter path.
public event PipelineRecordDeadLetteredEventHandler<TPipelineRecord>? OnPipelineRecordDeadLettered
Event Type
- PipelineRecordDeadLetteredEventHandler<TPipelineRecord>
OnPipelineRecordFaulted
Event that is raised when a record faults while traversing the pipeline.
public event PipelineRecordFaultedEventHandler<TPipelineRecord>? OnPipelineRecordFaulted
Event Type
- PipelineRecordFaultedEventHandler<TPipelineRecord>
OnPipelineRecordRetrying
Event that is raised when a record is scheduled for retry after a transient failure.
public event PipelineRecordRetryingEventHandler<TPipelineRecord>? OnPipelineRecordRetrying
Event Type
- PipelineRecordRetryingEventHandler<TPipelineRecord>
OnPublishRejected
Event that is raised when a publish request is rejected.
public event PipelinePublishRejectedEventHandler<TPipelineRecord>? OnPublishRejected
Event Type
- PipelinePublishRejectedEventHandler<TPipelineRecord>
OnSaturationChanged
Event that is raised when pipeline saturation state changes.
public event PipelineSaturationChangedEventHandler? OnSaturationChanged
Event Type
OnWorkerStarted
Event that is raised when a distributed worker starts.
public event PipelineWorkerStartedEventHandler? OnWorkerStarted
Event Type
OnWorkerStopping
Event that is raised when a distributed worker is stopping.
public event PipelineWorkerStoppingEventHandler? OnWorkerStopping