您现在访问的是微软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

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.

Abort() Inherited from ClientEntity
Close() Inherited from ClientEntity
CloseAsync() Inherited from ClientEntity
Fault() Inherited from ClientEntity
IsClosed Inherited from ClientEntity
OnClose(TimeSpan) Inherited from ClientEntity
OnClosed() Inherited from ClientEntity
OnFaulted() Inherited from ClientEntity
OnOpen(TimeSpan) Inherited from ClientEntity
OnOpened() Inherited from ClientEntity
RetryPolicy Inherited from ClientEntity
ThisLock Inherited from ClientEntity
ThrowIfClosed() Inherited from ClientEntity
ThrowIfDisposed() Inherited from ClientEntity
ThrowIfDisposedOrImmutable() Inherited from ClientEntity
ThrowIfDisposedOrNotOpen() Inherited from ClientEntity
ThrowIfFaulted() Inherited from ClientEntity
Abandon(Guid) Inherited from MessageReceiver
Abandon(Guid, IDictionary<String,Object>) Inherited from MessageReceiver
AbandonAsync(Guid) Inherited from MessageReceiver
AbandonAsync(Guid, IDictionary<String,Object>) Inherited from MessageReceiver
BatchFlushInterval Inherited from MessageReceiver
BatchingEnabled Inherited from MessageReceiver
Complete(Guid) Inherited from MessageReceiver
CompleteAsync(Guid) Inherited from MessageReceiver
CompleteBatch(IEnumerable<Guid>) Inherited from MessageReceiver
CompleteBatchAsync(IEnumerable<Guid>) Inherited from MessageReceiver
DeadLetter(Guid) Inherited from MessageReceiver
DeadLetter(Guid, IDictionary<String,Object>) Inherited from MessageReceiver
DeadLetter(Guid, String, String) Inherited from MessageReceiver
DeadLetterAsync(Guid) Inherited from MessageReceiver
DeadLetterAsync(Guid, IDictionary<String,Object>) Inherited from MessageReceiver
DeadLetterAsync(Guid, String, String) Inherited from MessageReceiver
Defer(Guid) Inherited from MessageReceiver
Defer(Guid, IDictionary<String,Object>) Inherited from MessageReceiver
DeferAsync(Guid) Inherited from MessageReceiver
DeferAsync(Guid, IDictionary<String,Object>) Inherited from MessageReceiver
GetLockToken(BrokeredMessage) Inherited from MessageReceiver
GetLockTokens(IEnumerable<BrokeredMessage>) Inherited from MessageReceiver
GetProperty<T>() Inherited from MessageReceiver
Mode Inherited from MessageReceiver
OffsetInclusive Inherited from MessageReceiver
OnBeginTryReceiveEventData(TrackingContext, Int32, TimeSpan, AsyncCallback, Object) Inherited from MessageReceiver
OnEndTryReceiveEventData(IAsyncResult, IEnumerable<EventData>) Inherited from MessageReceiver
OnMessage(Action<BrokeredMessage>, OnMessageOptions) Inherited from MessageReceiver
OnMessageAsync(Func<BrokeredMessage,Task>, OnMessageOptions) Inherited from MessageReceiver
OnPeek(TrackingContext, Int64, Int32, TimeSpan) Inherited from MessageReceiver
OnRenewMessageLocks(TrackingContext, IEnumerable<Guid>, TimeSpan) Inherited from MessageReceiver
Peek() Inherited from MessageReceiver
Peek(Int64) Inherited from MessageReceiver
PeekAsync() Inherited from MessageReceiver
PeekAsync(Int64) Inherited from MessageReceiver
PeekBatch(Int32) Inherited from MessageReceiver
PeekBatch(Int64, Int32) Inherited from MessageReceiver
PeekBatchAsync(Int32) Inherited from MessageReceiver
PeekBatchAsync(Int64, Int32) Inherited from MessageReceiver
Receive() Inherited from MessageReceiver
Receive(Int64) Inherited from MessageReceiver
Receive(TimeSpan) Inherited from MessageReceiver
ReceiveAsync() Inherited from MessageReceiver
ReceiveAsync(Int64) Inherited from MessageReceiver
ReceiveAsync(TimeSpan) Inherited from MessageReceiver
ReceiveBatch(IEnumerable<Int64>) Inherited from MessageReceiver
ReceiveBatch(Int32) Inherited from MessageReceiver
ReceiveBatch(Int32, TimeSpan) Inherited from MessageReceiver
ReceiveBatchAsync(IEnumerable<Int64>) Inherited from MessageReceiver
ReceiveBatchAsync(Int32) Inherited from MessageReceiver
ReceiveBatchAsync(Int32, TimeSpan) Inherited from MessageReceiver
ReceiverStartTime Inherited from MessageReceiver
StartOffset Inherited from MessageReceiver

Extension Methods

IsDefined(Object)

Determines if a certain property is defined or not.

IsNull(Object)

Determines if a certain property is null or not.

IsPrimitive(Object)

Determines if a certain property is of premitive JSON type.

Applies to