ServiceBusSessionProcessor.StartProcessingAsync(CancellationToken) Method

Definition

Signals the processor to begin processing messages. Should this method be called while the processor is already running, an InvalidOperationException is thrown.

C#
public virtual System.Threading.Tasks.Task StartProcessingAsync(System.Threading.CancellationToken cancellationToken = default);

Parameters

cancellationToken
CancellationToken

A CancellationToken instance to signal the request to cancel the start operation. This won't affect the processor once it starts running.

Returns

Exceptions

This can occur if the processor is already running. This can be checked via the IsProcessing property. This can also occur if event handlers have not been specified for the ProcessMessageAsync or the ProcessErrorAsync events.

Applies to

Product Versions
Azure SDK for .NET Latest, Preview