ServiceBusProcessor.StopProcessingAsync(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 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. Any in-flight message handlers will be awaited, and this method will not return until all in-flight message handlers have returned. To close the underlying receivers, CloseAsync(CancellationToken) should be called. If CloseAsync(CancellationToken) is called, the processor cannot be restarted. If you wish to resume processing at some point after calling this method, you can call StartProcessingAsync(CancellationToken).
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
- CancellationToken
A CancellationToken instance to signal the request to cancel the stop operation. If the operation is successfully canceled, the processor will keep running.
Returns
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應