Table of Contents

Class AzureServiceBusPipelineSource<T>

Namespace
Pipelinez.AzureServiceBus.Source
Assembly
Pipelinez.AzureServiceBus.dll

Consumes records from an Azure Service Bus queue or topic subscription and publishes them into a Pipelinez pipeline.

public class AzureServiceBusPipelineSource<T> : PipelineSourceBase<T>, IPipelineExecutionConfigurable, IDistributedPipelineSource<T>, IPipelineSource<T>, IFlowSource<PipelineContainer<T>> where T : PipelineRecord

Type Parameters

T

The pipeline record type.

Inheritance
AzureServiceBusPipelineSource<T>
Implements
Inherited Members

Constructors

AzureServiceBusPipelineSource(AzureServiceBusSourceOptions, Func<ServiceBusReceivedMessage, T>)

Initializes a new Azure Service Bus-backed pipeline source.

public AzureServiceBusPipelineSource(AzureServiceBusSourceOptions options, Func<ServiceBusReceivedMessage, T> recordMapper)

Parameters

options AzureServiceBusSourceOptions

The Azure Service Bus source options.

recordMapper Func<ServiceBusReceivedMessage, T>

Maps a Service Bus received message into a pipeline record.

Properties

SupportsDistributedExecution

Gets a value indicating whether the source supports distributed execution.

public bool SupportsDistributedExecution { get; }

Property Value

bool

TransportName

Gets the transport name reported in distributed metadata.

public string TransportName { get; }

Property Value

string

Methods

GetOwnedPartitions()

Gets the partitions currently owned by the source.

public IReadOnlyList<PipelinePartitionLease> GetOwnedPartitions()

Returns

IReadOnlyList<PipelinePartitionLease>

The owned partition leases.

GetPartitionExecutionStates()

Gets the current execution state for owned partitions.

public IReadOnlyList<PipelinePartitionExecutionState> GetPartitionExecutionStates()

Returns

IReadOnlyList<PipelinePartitionExecutionState>

The partition execution state snapshots.

Initialize()

Provides an opportunity for the source to initialize transport-specific state.

protected override void Initialize()

MainLoop(CancellationTokenSource)

Executes the main source loop.

protected override Task MainLoop(CancellationTokenSource cancellationToken)

Parameters

cancellationToken CancellationTokenSource

The runtime cancellation source used to stop the source.

Returns

Task

A task that completes when the source loop exits.

OnPipelineContainerComplete(object, PipelineContainerCompletedEventHandlerArgs<PipelineContainer<T>>)

Handles notification that a published container completed successfully.

public override void OnPipelineContainerComplete(object sender, PipelineContainerCompletedEventHandlerArgs<PipelineContainer<T>> e)

Parameters

sender object

The event sender.

e PipelineContainerCompletedEventHandlerArgs<PipelineContainer<T>>

The completed container event arguments.