Processor<TPartition>.On Partition Processing Stopped Async(TPartition, ProcessingStoppedReason, CancellationToken) Method
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 virtual System.Threading.Tasks.Task OnPartitionProcessingStoppedAsync (TPartition partition, Azure.Messaging.EventHubs.Processor.ProcessingStoppedReason reason, System.Threading.CancellationToken cancellationToken);
abstract member OnPartitionProcessingStoppedAsync : 'Partition * Azure.Messaging.EventHubs.Processor.ProcessingStoppedReason * System.Threading.CancellationToken -> System.Threading.Tasks.Task override this.OnPartitionProcessingStoppedAsync : 'Partition * Azure.Messaging.EventHubs.Processor.ProcessingStoppedReason * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overridable Function OnPartitionProcessingStoppedAsync (partition As TPartition, reason As ProcessingStoppedReason, cancellationToken As CancellationToken) As Task
The context of the partition for which processing is being stopped.
The reason that processing is being stopped for the partition.
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.
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.