Table of Contents

Interface IMessageSessionAsyncHandler

Namespace
Microsoft.ServiceBus.Messaging
Assembly
Microsoft.ServiceBus.dll

Represents an interface for the asynchronous handler for the message session.

public interface IMessageSessionAsyncHandler

Methods

OnCloseSessionAsync(MessageSession)

Raises an event that occurs when the session has been asynchronously closed.

Task OnCloseSessionAsync(MessageSession session)

Parameters

session MessageSession

The closed session.

Returns

Task

The task object representing the asynchronous operation.

OnMessageAsync(MessageSession, BrokeredMessage)

Raises an event that occurs when a message has been brokered.

Task OnMessageAsync(MessageSession session, BrokeredMessage message)

Parameters

session MessageSession

The message session.

message BrokeredMessage

The brokered message.

Returns

Task

The task object representing the asynchronous operation.

OnSessionLostAsync(Exception)

Raises an event that occurs when the session has been lost.

Task OnSessionLostAsync(Exception exception)

Parameters

exception Exception

The exception that occurred that caused the lost session.

Returns

Task

The task object representing the asynchronous operation.