你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ServiceBusSessionProcessor.SessionClosingAsync Event

Definition

Optional handler that can be set to be notified when a session is about to be closed for processing. This means that the most recent ReceiveMessageAsync(Nullable<TimeSpan>, CancellationToken) call timed out, or that ReleaseSession() was called in the ProcessMessageAsync handler.

public event Func<Azure.Messaging.ServiceBus.ProcessSessionEventArgs,System.Threading.Tasks.Task> SessionClosingAsync;
member this.SessionClosingAsync : Func<Azure.Messaging.ServiceBus.ProcessSessionEventArgs, System.Threading.Tasks.Task> 
Public Custom Event SessionClosingAsync As Func(Of ProcessSessionEventArgs, Task) 

Event Type

Remarks

It is not recommended that the state of the processor be managed directly from within this handler; requesting to start or stop the processor may result in a deadlock scenario.

Applies to