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

ServiceBusSessionProcessor.SessionClosingAsync 事件

定义

可设置为在会话即将关闭进行处理时通知的可选处理程序。 这意味着最近的 ReceiveMessageAsync(Nullable<TimeSpan>, CancellationToken) 调用超时,或在 ReleaseSession() 处理程序中调用的 ProcessMessageAsync 调用。

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) 

事件类型

注解

不建议直接从此处理程序内部管理处理器的状态;请求启动或停止处理器可能会导致死锁情况。

适用于