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
MessageSessionThe 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
MessageSessionThe message session.
message
BrokeredMessageThe 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
ExceptionThe exception that occurred that caused the lost session.
Returns
- Task
The task object representing the asynchronous operation.