ServiceBusSessionProcessor.StopProcessingAsync(CancellationToken) Method

Definition

Signals the processor to stop processing messaging. Should this method be called while the processor is not running, no action is taken. This method will not close the underlying receivers, but will cause the receivers to stop receiving. To close the underlying receivers, CloseAsync(CancellationToken) should be called.

public virtual System.Threading.Tasks.Task StopProcessingAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member StopProcessingAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.StopProcessingAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function StopProcessingAsync (Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

cancellationToken
System.Threading.CancellationToken

A System.Threading.CancellationToken instance to signal the request to cancel the stop operation. If the operation is successfully canceled, the processor will keep running.

Returns

System.Threading.Tasks.Task

Applies to