ServiceBusProcessor.CloseAsync(CancellationToken) Method

Definition

Performs the task needed to clean up resources used by the ServiceBusProcessor. Any in-flight message handlers will be awaited. Once all message handling has completed, the underlying links will be closed. After this point, the method will return. This is equivalent to calling DisposeAsync().

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

Parameters

cancellationToken
CancellationToken

An optionalCancellationToken instance to signal the request to cancel the operation.

Returns

Applies to