你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
ServiceBusProcessor.StartProcessingAsync(CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Signals the processor to begin processing messages. Should this method be called while the processor is already running, an InvalidOperationException is thrown.
public virtual System.Threading.Tasks.Task StartProcessingAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member StartProcessingAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.StartProcessingAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function StartProcessingAsync (Optional cancellationToken As CancellationToken = Nothing) As Task
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
反馈
提交和查看相关反馈