Delen via


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