EventProcessorClient.OnPartitionProcessingStoppedAsync Method

Definition

Performs the tasks needed when processing for a partition is being stopped. This commonly occurs when the partition is claimed by another event processor instance or when the current event processor instance is shutting down.

protected override System.Threading.Tasks.Task OnPartitionProcessingStoppedAsync (Azure.Messaging.EventHubs.Primitives.EventProcessorPartition partition, Azure.Messaging.EventHubs.Processor.ProcessingStoppedReason reason, System.Threading.CancellationToken cancellationToken);
override this.OnPartitionProcessingStoppedAsync : Azure.Messaging.EventHubs.Primitives.EventProcessorPartition * Azure.Messaging.EventHubs.Processor.ProcessingStoppedReason * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overrides Function OnPartitionProcessingStoppedAsync (partition As EventProcessorPartition, reason As ProcessingStoppedReason, cancellationToken As CancellationToken) As Task

Parameters

partition
EventProcessorPartition

The context of the partition for which processing is being stopped.

reason
ProcessingStoppedReason

The reason that processing is being stopped for the partition.

cancellationToken
CancellationToken

A CancellationToken instance to signal the request to cancel the processing. This is not expected to signal under normal circumstances and will only occur if the processor encounters an unrecoverable error.

Returns

Remarks

It is not recommended that the state of the processor be managed directly from within this method; requesting to start or stop the processor may result in a deadlock scenario, especially if using the synchronous form of the call.

Applies to