您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

MessageSession Class

Definition

Represents a message session that allows grouping of related messages for processing in a single transaction.

public abstract class MessageSession : Microsoft.ServiceBus.Messaging.MessageReceiver
Inheritance

Inherited Members

Microsoft.ServiceBus.Messaging.ClientEntity

Microsoft.ServiceBus.Messaging.MessageReceiver

Properties

LastPeekedSequenceNumber

Gets or sets the last peeked sequence number in the session.

LockedUntilUtc

Gets or sets the date and time at which the message session is unlocked.

Path

Gets the path of the queue or topic, relative to the MessagingFactory base address.

PrefetchCount

Gets or sets the number of messages that the message receiver can simultaneously request.

SessionId

Gets or sets the message session identifier.

SupportsGetRuntimeEntityDescription

Methods

GetState()

Gets the state of the message session.

GetStateAsync()

Asynchronously gets the state of the message session.

OnAbandon(TrackingContext, IEnumerable<Guid>, IDictionary<String,Object>, TimeSpan)

Abandons a peek locked message.

OnAbort()

Aborts the message session.

OnBeginAbandon(TrackingContext, IEnumerable<Guid>, IDictionary<String,Object>, Boolean, TimeSpan, AsyncCallback, Object)

Executes the begin abandon action.

OnBeginClose(TimeSpan, AsyncCallback, Object)

Begins an asynchronous operation to close the communication object for the message session.

OnBeginComplete(TrackingContext, IEnumerable<ArraySegment<Byte>>, Boolean, TimeSpan, AsyncCallback, Object)

Executes upon calling the OnComplete or BeginComplete operation.

OnBeginComplete(TrackingContext, IEnumerable<Guid>, Boolean, TimeSpan, AsyncCallback, Object)

Executes upon calling the OnComplete or BeginComplete operation.

OnBeginDeadLetter(TrackingContext, IEnumerable<Guid>, IDictionary<String,Object>, String, String, Boolean, TimeSpan, AsyncCallback, Object)

Executes the begin move to dead letter queue action.

OnBeginDefer(TrackingContext, IEnumerable<Guid>, IDictionary<String,Object>, Boolean, TimeSpan, AsyncCallback, Object)

Executes the begin defer action.

OnBeginGetState(TrackingContext, TimeSpan, AsyncCallback, Object)

Executes the begin get state action.

OnBeginOpen(TimeSpan, AsyncCallback, Object)

Executes upon calling the OnOpen operation of the message receiver.

OnBeginPeek(TrackingContext, Int64, Int32, TimeSpan, AsyncCallback, Object)

Executes upon calling the OnPeek or BeginPeek operation.

OnBeginRenewLock(TrackingContext, TimeSpan, AsyncCallback, Object)

Executes upon calling the RenewLock or BeginRenewLock operation.

OnBeginRenewMessageLocks(TrackingContext, IEnumerable<Guid>, Boolean, TimeSpan, AsyncCallback, Object)

Executes upon calling the OnBegin operation for lock messages.

OnBeginSetState(TrackingContext, Stream, TimeSpan, AsyncCallback, Object)

Executes the begin set state action.

OnBeginTryReceive(TrackingContext, IEnumerable<Int64>, TimeSpan, AsyncCallback, Object)

Executes the begin try receive action.

OnBeginTryReceive(TrackingContext, Int32, TimeSpan, AsyncCallback, Object)

Executes the begin try receive action.

OnBeginTryReceive2(TrackingContext, Int32, TimeSpan, AsyncCallback, Object)

Executes the begin try receive action.

OnComplete(TrackingContext, IEnumerable<Guid>, TimeSpan)

Completes a peek locked message.

OnDeadLetter(TrackingContext, IEnumerable<Guid>, IDictionary<String,Object>, String, String, TimeSpan)

Moves a message to the dead letter queue.

OnDefer(TrackingContext, IEnumerable<Guid>, IDictionary<String,Object>, TimeSpan)

Defers a message.

OnEndAbandon(IAsyncResult)

Ends an asynchronous operation to abandon the message and relinquish its lock.

OnEndClose(IAsyncResult)

Ends an asynchronous operation to close the communication object for the message session.

OnEndComplete(IAsyncResult)

Executes the end complete operation of the message receiver.

OnEndDeadLetter(IAsyncResult)

Executes the end deadletter operation of the message receiver.

OnEndDefer(IAsyncResult)

Executes the end defer operation of the message receiver.

OnEndGetState(IAsyncResult)

Executes upon calling the OnGetState or EndGetState operation.

OnEndOpen(IAsyncResult)

Ends the asynchronous operation to open a communication object for the message session.

OnEndPeek(IAsyncResult)

Executes upon calling the EndPeek operation.

OnEndRenewLock(IAsyncResult)

Executes the EndRenewLock operation of the message receiver.

OnEndRenewMessageLocks(IAsyncResult)

Executes the EndRenew action for message locks.

OnEndSetState(IAsyncResult)

Ends the asynchronous operation to set the state of the message session.

OnEndTryReceive(IAsyncResult, IEnumerable<BrokeredMessage>)

Executes the end try receive operation of the message receiver.

OnEndTryReceive2(IAsyncResult, IEnumerable<BrokeredMessage>)

Executes the end try receive operation of the message receiver.

OnGetState(TrackingContext, TimeSpan)

Executes the get state action.

OnRenewLock(TrackingContext, TimeSpan)

Executes the RenewLock action for message locks.

OnSetState(TrackingContext, Stream, TimeSpan)

Executes the set state action.

OnTryReceive(TrackingContext, IEnumerable<Int64>, TimeSpan, IEnumerable<BrokeredMessage>)

Executes the try receive action.

OnTryReceive(TrackingContext, Int32, TimeSpan, IEnumerable<BrokeredMessage>)

Executes the try receive action.

ProcessException(Exception)
RenewLock()

Specifies the time period within which the host renews its lock on a message.

RenewLockAsync()

Specifies the time period within which the host renews its lock on a message.

SetState(Stream)

Sets the state of the message session.

SetStateAsync(Stream)

Asynchronously sets the state of the message session.

Extension Methods

IsDefined(Object)
IsNull(Object)
IsPrimitive(Object)