MessageReceiver MessageReceiver Class

Receives messages from the message container and acknowledges them.

Syntax

Declaration

public abstract class MessageReceiver : ClientEntity, IMessageClientEntity, ICloseable, IMessageReceiver, IMessageBrowserPublic MustInherit Class MessageReceiver
    Inherits ClientEntity
    Implements IMessageClientEntity, ICloseable, IMessageReceiver, IMessageBrowser

Inheritance Hierarchy

Inherited Members

, , , , , ,
Abort()
Abort()
,
Abort()
Abort()
,
Close()
Close()
,
Close()
Close()
, , ,
Fault()
Fault()
,
Fault()
Fault()
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Properties summary

Gets the batch flush interval.

Gets a value indicating whether the batching is enabled.

Gets or sets the sequence number of the message last peeked.

Gets the message receive mode.

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

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

Gets or sets the start time of the receiver.

Gets or sets the starting point of the offset.

Methods summary

Discards the message and relinquishes the message lock ownership.

Discards the message and relinquishes the message lock ownership.

Asynchronously discards the message and relinquishes the message lock ownership.

Asynchronously discards the message and relinquishes the message lock ownership.

Completes the receive operation on a message. If using AMQP, this operation can only be performed on messages that were received by this receiver.

Asynchronously completes the receive operation on a message. If using AMQP, this operation can only be performed on messages that were received by this receiver.

Completes the receive operation on a batch of message. If using AMQP, this operation can only be performed on messages that were received by this receiver.

Asynchronously completes the receive operation on a batch of message. If using AMQP, this operation can only be performed on messages that were received by this receiver.

Moves the undelivered message to the dead letter queue.

Moves the undelivered message to the dead letter queue.

Moves the undelivered message to the dead letter queue.

Asynchronously moves the undelivered message to the dead letter queue.

Asynchronously moves the undelivered message to the dead letter queue.

Asynchronously moves the undelivered message to the dead letter queue.

Indicates that the receiver wants to defer the processing for the message.

Indicates that the receiver wants to defer the processing for the message.

Asynchronously defer the processing of the message.

Asynchronously defer the processing of the message.

Gets the lock token bound to the message.

Gets the collection of lock tokens from the specified collection of messages.

Executes the abandon action.

Executes upon calling the OnAbandon or BeginAbandon operation.

Executes upon calling the OnComplete or BeginComplete operation.

Executes upon calling the OnComplete or BeginComplete operation.

Executes upon calling the OnDeadLetter or BeginDeadLetter operation.

Executes upon calling the OnDefer or BeginDefer operation.

Executes upon calling the BeginPeek operation.

Executes upon calling the OnBegin operation for lock messages.

Executes the begin try receive action.

Executes the begin try receive action.

Executes the begin try receive action.

Executes upon calling the OnTryReceive or BeginTryReceive operation for the event data.

Executes the complete action.

Executes the move to dead letter queue action.

Executes the defer action.

Executes the end abandon action.

Executes the end complete action.

Executes the end move to dead letter queue action.

Executes the end defer action.

Executes the EndPeek operation.

Executes the EndRenew action for message locks.

Executes the end try receive action.

Executes the end try receive action.

Executes the EndTryReceive action for the event data.

Processes a message in an event-driven message pump.

Asynchronously processes a message in an event-driven message pump.

Executes upon calling the Peek operation.

Executes the Renew action for lock messages.

Executes the try receive action.

Executes the try receive action.

Reads the next message without changing the state of the receiver or the message source.

Reads the next message without changing the state of the receiver or the message source.

Asynchronously reads the next message without changing the state of the receiver or the message source.

Asynchronously reads the next message without changing the state of the receiver or the message source.

Reads the next batch of message without changing the state of the receiver or the message source.

Reads the next batch of message without changing the state of the receiver or the message source.

Asynchronously reads the next batch of message without changing the state of the receiver or the message source.

Asynchronously reads the next batch of message without changing the state of the receiver or the message source.

Receives a BrokeredMessage from the current queue or topic.

Receives a message from the current queue or topic.

Receives a BrokeredMessage from the current queue or topic.

Asynchronously receives a message from the current queue or topic.

Asynchronously receives a message from the current queue or topic.

Asynchronously receives a message from the current queue or topic.

Receives a batch of messages.

Receives a batch of messages.

Receives a batch of messages.

Asynchronously receives a batch of messages.

Asynchronously receives a batch of messages.

Asynchronously receives a batch of messages.

Properties

  • BatchFlushInterval
    BatchFlushInterval

    Gets the batch flush interval.

    public virtual TimeSpan BatchFlushInterval { get; }Public Overridable ReadOnly Property BatchFlushInterval As TimeSpan

    Property Value

  • BatchingEnabled
    BatchingEnabled

    Gets a value indicating whether the batching is enabled.

    protected bool BatchingEnabled { get; }Protected ReadOnly Property BatchingEnabled As Boolean

    Property Value

  • LastPeekedSequenceNumber
    LastPeekedSequenceNumber

    Gets or sets the sequence number of the message last peeked.

    public virtual long LastPeekedSequenceNumber { get; }Public Overridable ReadOnly Property LastPeekedSequenceNumber As Long

    Property Value

    • The sequence number of the message last peeked.

  • Mode
    Mode

    Gets the message receive mode.

    public ReceiveMode Mode { get; protected set; }Public Property Mode As ReceiveMode

    Property Value

  • OffsetInclusive
    OffsetInclusive
    protected virtual bool OffsetInclusive { get; set; }Protected Overridable Property OffsetInclusive As Boolean

    Property Value

  • Path
    Path

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

    public abstract string Path { get; }Public MustOverride ReadOnly Property Path As String

    Property Value

    • A string representing the path of the queue or topic.

  • PrefetchCount
    PrefetchCount

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

    public virtual int PrefetchCount { get; set; }Public Overridable Property PrefetchCount As Integer

    Property Value

    • The number of messages that the message receiver can simultaneously request.

  • ReceiverStartTime
    ReceiverStartTime

    Gets or sets the start time of the receiver.

    protected virtual DateTime? ReceiverStartTime { get; set; }Protected Overridable Property ReceiverStartTime As Date?

    Property Value

  • StartOffset
    StartOffset

    Gets or sets the starting point of the offset.

    protected virtual string StartOffset { get; set; }Protected Overridable Property StartOffset As String

    Property Value

  • SupportsGetRuntimeEntityDescription
    SupportsGetRuntimeEntityDescription
    protected abstract bool SupportsGetRuntimeEntityDescription { get; }Protected MustOverride ReadOnly Property SupportsGetRuntimeEntityDescription As Boolean

    Property Value

Methods

  • Abandon(Guid)
    Abandon(Guid)

    Discards the message and relinquishes the message lock ownership.

    public void Abandon(Guid lockToken)Public Sub Abandon(lockToken As Guid)

    Parameters

    • lockToken

      The lock token bound to the locked message instance to abandon.

  • Abandon(Guid, IDictionary<String, Object>)
    Abandon(Guid, IDictionary(Of String, Object))

    Discards the message and relinquishes the message lock ownership.

    public void Abandon(Guid lockToken, IDictionary<string, object> propertiesToModify)Public Sub Abandon(lockToken As Guid, propertiesToModify As IDictionary(Of String, Object))

    Parameters

  • AbandonAsync(Guid)
    AbandonAsync(Guid)

    Asynchronously discards the message and relinquishes the message lock ownership.

    public Task AbandonAsync(Guid lockToken)Public Function AbandonAsync(lockToken As Guid) As Task

    Parameters

    • lockToken

      The lock token bound to the locked message instance to abandon.

    Returns

  • AbandonAsync(Guid, IDictionary<String, Object>)
    AbandonAsync(Guid, IDictionary(Of String, Object))

    Asynchronously discards the message and relinquishes the message lock ownership.

    public Task AbandonAsync(Guid lockToken, IDictionary<string, object> propertiesToModify)Public Function AbandonAsync(lockToken As Guid, propertiesToModify As IDictionary(Of String, Object)) As Task

    Parameters

    Returns

  • Complete(Guid)
    Complete(Guid)

    Completes the receive operation on a message. If using AMQP, this operation can only be performed on messages that were received by this receiver.

    public void Complete(Guid lockToken)Public Sub Complete(lockToken As Guid)

    Parameters

    • lockToken

      The lock token of the BrokeredMessage. This is only available when a message is received in peek-lock mode. The lock token is used internally to complete or abandon a message.

  • CompleteAsync(Guid)
    CompleteAsync(Guid)

    Asynchronously completes the receive operation on a message. If using AMQP, this operation can only be performed on messages that were received by this receiver.

    public Task CompleteAsync(Guid lockToken)Public Function CompleteAsync(lockToken As Guid) As Task

    Parameters

    Returns

  • CompleteBatch(IEnumerable<Guid>)
    CompleteBatch(IEnumerable(Of Guid))

    Completes the receive operation on a batch of message. If using AMQP, this operation can only be performed on messages that were received by this receiver.

    public void CompleteBatch(IEnumerable<Guid> lockTokens)Public Sub CompleteBatch(lockTokens As IEnumerable(Of Guid))

    Parameters

  • CompleteBatchAsync(IEnumerable<Guid>)
    CompleteBatchAsync(IEnumerable(Of Guid))

    Asynchronously completes the receive operation on a batch of message. If using AMQP, this operation can only be performed on messages that were received by this receiver.

    public Task CompleteBatchAsync(IEnumerable<Guid> lockTokens)Public Function CompleteBatchAsync(lockTokens As IEnumerable(Of Guid)) As Task

    Parameters

    Returns

  • DeadLetter(Guid)
    DeadLetter(Guid)

    Moves the undelivered message to the dead letter queue.

    public void DeadLetter(Guid lockToken)Public Sub DeadLetter(lockToken As Guid)

    Parameters

    • lockToken

      The lock token bound to the locked message instance.

  • DeadLetter(Guid, IDictionary<String, Object>)
    DeadLetter(Guid, IDictionary(Of String, Object))

    Moves the undelivered message to the dead letter queue.

    public void DeadLetter(Guid lockToken, IDictionary<string, object> propertiesToModify)Public Sub DeadLetter(lockToken As Guid, propertiesToModify As IDictionary(Of String, Object))

    Parameters

  • DeadLetter(Guid, String, String)
    DeadLetter(Guid, String, String)

    Moves the undelivered message to the dead letter queue.

    public void DeadLetter(Guid lockToken, string deadLetterReason, string deadLetterErrorDescription)Public Sub DeadLetter(lockToken As Guid, deadLetterReason As String, deadLetterErrorDescription As String)

    Parameters

    • lockToken

      The lock token bound to the locked message instance.

    • deadLetterReason

      The reason for deadlettering the message.

    • deadLetterErrorDescription

      The error description for deadlettering the message.

  • DeadLetterAsync(Guid)
    DeadLetterAsync(Guid)

    Asynchronously moves the undelivered message to the dead letter queue.

    public Task DeadLetterAsync(Guid lockToken)Public Function DeadLetterAsync(lockToken As Guid) As Task

    Parameters

    • lockToken

      The lock token bound to the locked message instance.

    Returns

  • DeadLetterAsync(Guid, IDictionary<String, Object>)
    DeadLetterAsync(Guid, IDictionary(Of String, Object))

    Asynchronously moves the undelivered message to the dead letter queue.

    public Task DeadLetterAsync(Guid lockToken, IDictionary<string, object> propertiesToModify)Public Function DeadLetterAsync(lockToken As Guid, propertiesToModify As IDictionary(Of String, Object)) As Task

    Parameters

    Returns

  • DeadLetterAsync(Guid, String, String)
    DeadLetterAsync(Guid, String, String)

    Asynchronously moves the undelivered message to the dead letter queue.

    public Task DeadLetterAsync(Guid lockToken, string deadLetterReason, string deadLetterErrorDescription)Public Function DeadLetterAsync(lockToken As Guid, deadLetterReason As String, deadLetterErrorDescription As String) As Task

    Parameters

    • lockToken

      The lock token bound to the locked message instance.

    • deadLetterReason

      The reason for deadlettering the message.

    • deadLetterErrorDescription

      The error description for deadlettering the message.

    Returns

  • Defer(Guid)
    Defer(Guid)

    Indicates that the receiver wants to defer the processing for the message.

    public void Defer(Guid lockToken)Public Sub Defer(lockToken As Guid)

    Parameters

    • lockToken

      The lock token of the BrokeredMessage. This is only available when a message is received in peek-lock mode. The lock token is used internally to complete or abandon a message.

    Exceptions

    • Microsoft.ServiceBus.Common.Fx.Exception
      Microsoft.ServiceBus.Common.Fx.Exception

      Receive context is null.

  • Defer(Guid, IDictionary<String, Object>)
    Defer(Guid, IDictionary(Of String, Object))

    Indicates that the receiver wants to defer the processing for the message.

    public void Defer(Guid lockToken, IDictionary<string, object> propertiesToModify)Public Sub Defer(lockToken As Guid, propertiesToModify As IDictionary(Of String, Object))

    Parameters

  • DeferAsync(Guid)
    DeferAsync(Guid)

    Asynchronously defer the processing of the message.

    public Task DeferAsync(Guid lockToken)Public Function DeferAsync(lockToken As Guid) As Task

    Parameters

    Returns

  • DeferAsync(Guid, IDictionary<String, Object>)
    DeferAsync(Guid, IDictionary(Of String, Object))

    Asynchronously defer the processing of the message.

    public Task DeferAsync(Guid lockToken, IDictionary<string, object> propertiesToModify)Public Function DeferAsync(lockToken As Guid, propertiesToModify As IDictionary(Of String, Object)) As Task

    Parameters

    Returns

  • GetLockToken(BrokeredMessage)
    GetLockToken(BrokeredMessage)

    Gets the lock token bound to the message.

    protected static Guid GetLockToken(BrokeredMessage message)Protected Shared Function GetLockToken(message As BrokeredMessage) As Guid

    Parameters

    Returns

    • The lock token of the message.

  • GetLockTokens(IEnumerable<BrokeredMessage>)
    GetLockTokens(IEnumerable(Of BrokeredMessage))

    Gets the collection of lock tokens from the specified collection of messages.

    protected static IEnumerable<Guid> GetLockTokens(IEnumerable<BrokeredMessage> messages)Protected Shared Function GetLockTokens(messages As IEnumerable(Of BrokeredMessage)) As IEnumerable(Of Guid)

    Parameters

    Returns

  • GetProperty<T>()
    GetProperty(Of T)()
    protected virtual T GetProperty<T>()Protected Overridable Function GetProperty(Of T) As T

    Returns

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

    Executes the abandon action.

    protected virtual void OnAbandon(TrackingContext trackingContext, IEnumerable<Guid> lockTokens, IDictionary<string, object> propertiesToModify, TimeSpan timeout)Protected Overridable Sub OnAbandon(trackingContext As TrackingContext, lockTokens As IEnumerable(Of Guid), propertiesToModify As IDictionary(Of String, Object), timeout As TimeSpan)

    Parameters

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

    Executes upon calling the OnAbandon or BeginAbandon operation.

    protected abstract IAsyncResult OnBeginAbandon(TrackingContext trackingContext, IEnumerable<Guid> lockTokens, IDictionary<string, object> propertiesToModify, bool fromSync, TimeSpan timeout, AsyncCallback callback, object state)Protected MustOverride Function OnBeginAbandon(trackingContext As TrackingContext, lockTokens As IEnumerable(Of Guid), propertiesToModify As IDictionary(Of String, Object), fromSync As Boolean, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    Returns

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

    Executes upon calling the OnComplete or BeginComplete operation.

    protected abstract IAsyncResult OnBeginComplete(TrackingContext trackingContext, IEnumerable<ArraySegment<byte>> deliveryTags, bool fromSync, TimeSpan timeout, AsyncCallback callback, object state)Protected MustOverride Function OnBeginComplete(trackingContext As TrackingContext, deliveryTags As IEnumerable(Of ArraySegment(Of Byte)), fromSync As Boolean, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    Returns

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

    Executes upon calling the OnComplete or BeginComplete operation.

    protected abstract IAsyncResult OnBeginComplete(TrackingContext trackingContext, IEnumerable<Guid> lockTokens, bool fromSync, TimeSpan timeout, AsyncCallback callback, object state)Protected MustOverride Function OnBeginComplete(trackingContext As TrackingContext, lockTokens As IEnumerable(Of Guid), fromSync As Boolean, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    Returns

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

    Executes upon calling the OnDeadLetter or BeginDeadLetter operation.

    protected abstract IAsyncResult OnBeginDeadLetter(TrackingContext trackingContext, IEnumerable<Guid> lockTokens, IDictionary<string, object> propertiesToModify, string deadLetterReason, string deadLetterErrorDescription, bool fromSync, TimeSpan timeout, AsyncCallback callback, object state)Protected MustOverride Function OnBeginDeadLetter(trackingContext As TrackingContext, lockTokens As IEnumerable(Of Guid), propertiesToModify As IDictionary(Of String, Object), deadLetterReason As String, deadLetterErrorDescription As String, fromSync As Boolean, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    Returns

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

    Executes upon calling the OnDefer or BeginDefer operation.

    protected abstract IAsyncResult OnBeginDefer(TrackingContext trackingContext, IEnumerable<Guid> lockTokens, IDictionary<string, object> propertiesToModify, bool fromSync, TimeSpan timeout, AsyncCallback callback, object state)Protected MustOverride Function OnBeginDefer(trackingContext As TrackingContext, lockTokens As IEnumerable(Of Guid), propertiesToModify As IDictionary(Of String, Object), fromSync As Boolean, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    Returns

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

    Executes upon calling the BeginPeek operation.

    protected abstract IAsyncResult OnBeginPeek(TrackingContext trackingContext, long fromSequenceNumber, int messageCount, TimeSpan timeout, AsyncCallback callback, object state)Protected MustOverride Function OnBeginPeek(trackingContext As TrackingContext, fromSequenceNumber As Long, messageCount As Integer, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    Returns

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

    Executes upon calling the OnBegin operation for lock messages.

    protected abstract IAsyncResult OnBeginRenewMessageLocks(TrackingContext trackingContext, IEnumerable<Guid> lockTokens, bool fromSync, TimeSpan timeout, AsyncCallback callback, object state)Protected MustOverride Function OnBeginRenewMessageLocks(trackingContext As TrackingContext, lockTokens As IEnumerable(Of Guid), fromSync As Boolean, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    Returns

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

    Executes the begin try receive action.

    protected abstract IAsyncResult OnBeginTryReceive(TrackingContext trackingContext, IEnumerable<long> sequenceNumbers, TimeSpan timeout, AsyncCallback callback, object state)Protected MustOverride Function OnBeginTryReceive(trackingContext As TrackingContext, sequenceNumbers As IEnumerable(Of Long), timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    Returns

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

    Executes the begin try receive action.

    protected abstract IAsyncResult OnBeginTryReceive(TrackingContext trackingContext, int messageCount, TimeSpan serverWaitTime, AsyncCallback callback, object state)Protected MustOverride Function OnBeginTryReceive(trackingContext As TrackingContext, messageCount As Integer, serverWaitTime As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    Returns

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

    Executes the begin try receive action.

    protected abstract IAsyncResult OnBeginTryReceive2(TrackingContext trackingContext, int messageCount, TimeSpan serverWaitTime, AsyncCallback callback, object state)Protected MustOverride Function OnBeginTryReceive2(trackingContext As TrackingContext, messageCount As Integer, serverWaitTime As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    Returns

  • OnBeginTryReceiveEventData(TrackingContext, Int32, TimeSpan, AsyncCallback, Object)
    OnBeginTryReceiveEventData(TrackingContext, Int32, TimeSpan, AsyncCallback, Object)

    Executes upon calling the OnTryReceive or BeginTryReceive operation for the event data.

    protected virtual IAsyncResult OnBeginTryReceiveEventData(TrackingContext trackingContext, int messageCount, TimeSpan serverWaitTime, AsyncCallback callback, object state)Protected Overridable Function OnBeginTryReceiveEventData(trackingContext As TrackingContext, messageCount As Integer, serverWaitTime As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    Returns

  • OnComplete(TrackingContext, IEnumerable<Guid>, TimeSpan)
    OnComplete(TrackingContext, IEnumerable(Of Guid), TimeSpan)

    Executes the complete action.

    protected virtual void OnComplete(TrackingContext trackingContext, IEnumerable<Guid> lockTokens, TimeSpan timeout)Protected Overridable Sub OnComplete(trackingContext As TrackingContext, lockTokens As IEnumerable(Of Guid), timeout As TimeSpan)

    Parameters

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

    Executes the move to dead letter queue action.

    protected virtual void OnDeadLetter(TrackingContext trackingContext, IEnumerable<Guid> lockTokens, IDictionary<string, object> propertiesToModify, string deadLetterReason, string deadLetterErrorDescription, TimeSpan timeout)Protected Overridable Sub OnDeadLetter(trackingContext As TrackingContext, lockTokens As IEnumerable(Of Guid), propertiesToModify As IDictionary(Of String, Object), deadLetterReason As String, deadLetterErrorDescription As String, timeout As TimeSpan)

    Parameters

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

    Executes the defer action.

    protected virtual void OnDefer(TrackingContext trackingContext, IEnumerable<Guid> lockTokens, IDictionary<string, object> propertiesToModify, TimeSpan timeout)Protected Overridable Sub OnDefer(trackingContext As TrackingContext, lockTokens As IEnumerable(Of Guid), propertiesToModify As IDictionary(Of String, Object), timeout As TimeSpan)

    Parameters

  • OnEndAbandon(IAsyncResult)
    OnEndAbandon(IAsyncResult)

    Executes the end abandon action.

    protected abstract void OnEndAbandon(IAsyncResult result)Protected MustOverride Sub OnEndAbandon(result As IAsyncResult)

    Parameters

  • OnEndComplete(IAsyncResult)
    OnEndComplete(IAsyncResult)

    Executes the end complete action.

    protected abstract void OnEndComplete(IAsyncResult result)Protected MustOverride Sub OnEndComplete(result As IAsyncResult)

    Parameters

  • OnEndDeadLetter(IAsyncResult)
    OnEndDeadLetter(IAsyncResult)

    Executes the end move to dead letter queue action.

    protected abstract void OnEndDeadLetter(IAsyncResult result)Protected MustOverride Sub OnEndDeadLetter(result As IAsyncResult)

    Parameters

  • OnEndDefer(IAsyncResult)
    OnEndDefer(IAsyncResult)

    Executes the end defer action.

    protected abstract void OnEndDefer(IAsyncResult result)Protected MustOverride Sub OnEndDefer(result As IAsyncResult)

    Parameters

  • OnEndPeek(IAsyncResult)
    OnEndPeek(IAsyncResult)

    Executes the EndPeek operation.

    protected abstract IEnumerable<BrokeredMessage> OnEndPeek(IAsyncResult result)Protected MustOverride Function OnEndPeek(result As IAsyncResult) As IEnumerable(Of BrokeredMessage)

    Parameters

    Returns

  • OnEndRenewMessageLocks(IAsyncResult)
    OnEndRenewMessageLocks(IAsyncResult)

    Executes the EndRenew action for message locks.

    protected abstract IEnumerable<DateTime> OnEndRenewMessageLocks(IAsyncResult result)Protected MustOverride Function OnEndRenewMessageLocks(result As IAsyncResult) As IEnumerable(Of Date)

    Parameters

    Returns

  • OnEndTryReceive(IAsyncResult, out IEnumerable<BrokeredMessage>)
    OnEndTryReceive(IAsyncResult, ByRef IEnumerable(Of BrokeredMessage))

    Executes the end try receive action.

    protected abstract bool OnEndTryReceive(IAsyncResult result, out IEnumerable<BrokeredMessage> messages)Protected MustOverride Function OnEndTryReceive(result As IAsyncResult, ByRef messages As IEnumerable(Of BrokeredMessage)) As Boolean

    Parameters

    Returns

  • OnEndTryReceive2(IAsyncResult, out IEnumerable<BrokeredMessage>)
    OnEndTryReceive2(IAsyncResult, ByRef IEnumerable(Of BrokeredMessage))

    Executes the end try receive action.

    protected abstract bool OnEndTryReceive2(IAsyncResult result, out IEnumerable<BrokeredMessage> messages)Protected MustOverride Function OnEndTryReceive2(result As IAsyncResult, ByRef messages As IEnumerable(Of BrokeredMessage)) As Boolean

    Parameters

    Returns

  • OnEndTryReceiveEventData(IAsyncResult, out IEnumerable<EventData>)
    OnEndTryReceiveEventData(IAsyncResult, ByRef IEnumerable(Of EventData))

    Executes the EndTryReceive action for the event data.

    protected virtual bool OnEndTryReceiveEventData(IAsyncResult result, out IEnumerable<EventData> messages)Protected Overridable Function OnEndTryReceiveEventData(result As IAsyncResult, ByRef messages As IEnumerable(Of EventData)) As Boolean

    Parameters

    Returns

  • OnMessage(Action<BrokeredMessage>, OnMessageOptions)
    OnMessage(Action(Of BrokeredMessage), OnMessageOptions)

    Processes a message in an event-driven message pump.

    public void OnMessage(Action<BrokeredMessage> callback, OnMessageOptions options)Public Sub OnMessage(callback As Action(Of BrokeredMessage), options As OnMessageOptions)

    Parameters

  • OnMessageAsync(Func<BrokeredMessage, Task>, OnMessageOptions)
    OnMessageAsync(Func(Of BrokeredMessage, Task), OnMessageOptions)

    Asynchronously processes a message in an event-driven message pump.

    public void OnMessageAsync(Func<BrokeredMessage, Task> callback, OnMessageOptions options)Public Sub OnMessageAsync(callback As Func(Of BrokeredMessage, Task), options As OnMessageOptions)

    Parameters

  • OnPeek(TrackingContext, Int64, Int32, TimeSpan)
    OnPeek(TrackingContext, Int64, Int32, TimeSpan)

    Executes upon calling the Peek operation.

    protected virtual IEnumerable<BrokeredMessage> OnPeek(TrackingContext trackingContext, long fromSequenceNumber, int messageCount, TimeSpan timeout)Protected Overridable Function OnPeek(trackingContext As TrackingContext, fromSequenceNumber As Long, messageCount As Integer, timeout As TimeSpan) As IEnumerable(Of BrokeredMessage)

    Parameters

    Returns

  • OnRenewMessageLocks(TrackingContext, IEnumerable<Guid>, TimeSpan)
    OnRenewMessageLocks(TrackingContext, IEnumerable(Of Guid), TimeSpan)

    Executes the Renew action for lock messages.

    protected virtual IEnumerable<DateTime> OnRenewMessageLocks(TrackingContext trackingContext, IEnumerable<Guid> lockTokens, TimeSpan timeout)Protected Overridable Function OnRenewMessageLocks(trackingContext As TrackingContext, lockTokens As IEnumerable(Of Guid), timeout As TimeSpan) As IEnumerable(Of Date)

    Parameters

    Returns

  • OnTryReceive(TrackingContext, IEnumerable<Int64>, TimeSpan, out IEnumerable<BrokeredMessage>)
    OnTryReceive(TrackingContext, IEnumerable(Of Int64), TimeSpan, ByRef IEnumerable(Of BrokeredMessage))

    Executes the try receive action.

    protected virtual bool OnTryReceive(TrackingContext trackingContext, IEnumerable<long> sequenceNumbers, TimeSpan timeout, out IEnumerable<BrokeredMessage> messages)Protected Overridable Function OnTryReceive(trackingContext As TrackingContext, sequenceNumbers As IEnumerable(Of Long), timeout As TimeSpan, ByRef messages As IEnumerable(Of BrokeredMessage)) As Boolean

    Parameters

    Returns

  • OnTryReceive(TrackingContext, Int32, TimeSpan, out IEnumerable<BrokeredMessage>)
    OnTryReceive(TrackingContext, Int32, TimeSpan, ByRef IEnumerable(Of BrokeredMessage))

    Executes the try receive action.

    protected virtual bool OnTryReceive(TrackingContext trackingContext, int messageCount, TimeSpan serverWaitTime, out IEnumerable<BrokeredMessage> messages)Protected Overridable Function OnTryReceive(trackingContext As TrackingContext, messageCount As Integer, serverWaitTime As TimeSpan, ByRef messages As IEnumerable(Of BrokeredMessage)) As Boolean

    Parameters

    Returns

  • Peek()
    Peek()

    Reads the next message without changing the state of the receiver or the message source.

    public BrokeredMessage Peek()Public Function Peek As BrokeredMessage

    Returns

  • Peek(Int64)
    Peek(Int64)

    Reads the next message without changing the state of the receiver or the message source.

    public BrokeredMessage Peek(long fromSequenceNumber)Public Function Peek(fromSequenceNumber As Long) As BrokeredMessage

    Parameters

    • fromSequenceNumber

      The sequence number from where to read the message.

    Returns

  • PeekAsync()
    PeekAsync()

    Asynchronously reads the next message without changing the state of the receiver or the message source.

    public Task<BrokeredMessage> PeekAsync()Public Function PeekAsync As Task(Of BrokeredMessage)

    Returns

  • PeekAsync(Int64)
    PeekAsync(Int64)

    Asynchronously reads the next message without changing the state of the receiver or the message source.

    public Task<BrokeredMessage> PeekAsync(long fromSequenceNumber)Public Function PeekAsync(fromSequenceNumber As Long) As Task(Of BrokeredMessage)

    Parameters

    • fromSequenceNumber

      The sequence number from where to read the message.

    Returns

  • PeekBatch(Int32)
    PeekBatch(Int32)

    Reads the next batch of message without changing the state of the receiver or the message source.

    public IEnumerable<BrokeredMessage> PeekBatch(int messageCount)Public Function PeekBatch(messageCount As Integer) As IEnumerable(Of BrokeredMessage)

    Parameters

    Returns

  • PeekBatch(Int64, Int32)
    PeekBatch(Int64, Int32)

    Reads the next batch of message without changing the state of the receiver or the message source.

    public IEnumerable<BrokeredMessage> PeekBatch(long fromSequenceNumber, int messageCount)Public Function PeekBatch(fromSequenceNumber As Long, messageCount As Integer) As IEnumerable(Of BrokeredMessage)

    Parameters

    • fromSequenceNumber

      The sequence number from where to read a batch message.

    • messageCount

      The number of message.

    Returns

  • PeekBatchAsync(Int32)
    PeekBatchAsync(Int32)

    Asynchronously reads the next batch of message without changing the state of the receiver or the message source.

    public Task<IEnumerable<BrokeredMessage>> PeekBatchAsync(int messageCount)Public Function PeekBatchAsync(messageCount As Integer) As Task(Of IEnumerable(Of BrokeredMessage))

    Parameters

    Returns

  • PeekBatchAsync(Int64, Int32)
    PeekBatchAsync(Int64, Int32)

    Asynchronously reads the next batch of message without changing the state of the receiver or the message source.

    public Task<IEnumerable<BrokeredMessage>> PeekBatchAsync(long fromSequenceNumber, int messageCount)Public Function PeekBatchAsync(fromSequenceNumber As Long, messageCount As Integer) As Task(Of IEnumerable(Of BrokeredMessage))

    Parameters

    • fromSequenceNumber

      The sequence number from where to read a batch message.

    • messageCount

      The number of message.

    Returns

  • Receive()
    Receive()

    Receives a BrokeredMessage from the current queue or topic.

    public BrokeredMessage Receive()Public Function Receive As BrokeredMessage

    Returns

  • Receive(Int64)
    Receive(Int64)

    Receives a message from the current queue or topic.

    public BrokeredMessage Receive(long sequenceNumber)Public Function Receive(sequenceNumber As Long) As BrokeredMessage

    Parameters

    • sequenceNumber

      The sequence number of the message to receive.

    Returns

  • Receive(TimeSpan)
    Receive(TimeSpan)

    Receives a BrokeredMessage from the current queue or topic.

    public BrokeredMessage Receive(TimeSpan serverWaitTime)Public Function Receive(serverWaitTime As TimeSpan) As BrokeredMessage

    Parameters

    • serverWaitTime

      The time span the server waits before the operation times out.

    Returns

  • ReceiveAsync()
    ReceiveAsync()

    Asynchronously receives a message from the current queue or topic.

    public Task<BrokeredMessage> ReceiveAsync()Public Function ReceiveAsync As Task(Of BrokeredMessage)

    Returns

  • ReceiveAsync(Int64)
    ReceiveAsync(Int64)

    Asynchronously receives a message from the current queue or topic.

    public Task<BrokeredMessage> ReceiveAsync(long sequenceNumber)Public Function ReceiveAsync(sequenceNumber As Long) As Task(Of BrokeredMessage)

    Parameters

    • sequenceNumber

      The sequence number of the message to receive.

    Returns

  • ReceiveAsync(TimeSpan)
    ReceiveAsync(TimeSpan)

    Asynchronously receives a message from the current queue or topic.

    public Task<BrokeredMessage> ReceiveAsync(TimeSpan serverWaitTime)Public Function ReceiveAsync(serverWaitTime As TimeSpan) As Task(Of BrokeredMessage)

    Parameters

    • serverWaitTime

      The time span the server waits before the operation times out.

    Returns

  • ReceiveBatch(IEnumerable<Int64>)
    ReceiveBatch(IEnumerable(Of Int64))

    Receives a batch of messages.

    public IEnumerable<BrokeredMessage> ReceiveBatch(IEnumerable<long> sequenceNumbers)Public Function ReceiveBatch(sequenceNumbers As IEnumerable(Of Long)) As IEnumerable(Of BrokeredMessage)

    Parameters

    Returns

  • ReceiveBatch(Int32)
    ReceiveBatch(Int32)

    Receives a batch of messages.

    public IEnumerable<BrokeredMessage> ReceiveBatch(int messageCount)Public Function ReceiveBatch(messageCount As Integer) As IEnumerable(Of BrokeredMessage)

    Parameters

    • messageCount

      The number of messages to return in the batch. As this is an approximation, fewer or more messages than messageCount may be returned.

    Returns

  • ReceiveBatch(Int32, TimeSpan)
    ReceiveBatch(Int32, TimeSpan)

    Receives a batch of messages.

    public IEnumerable<BrokeredMessage> ReceiveBatch(int messageCount, TimeSpan serverWaitTime)Public Function ReceiveBatch(messageCount As Integer, serverWaitTime As TimeSpan) As IEnumerable(Of BrokeredMessage)

    Parameters

    • messageCount

      The number of messages to return in the batch. As this is an approximation, fewer or more messages than messageCount may be returned.

    • serverWaitTime

      The server wait time.

    Returns

  • ReceiveBatchAsync(IEnumerable<Int64>)
    ReceiveBatchAsync(IEnumerable(Of Int64))

    Asynchronously receives a batch of messages.

    public Task<IEnumerable<BrokeredMessage>> ReceiveBatchAsync(IEnumerable<long> sequenceNumbers)Public Function ReceiveBatchAsync(sequenceNumbers As IEnumerable(Of Long)) As Task(Of IEnumerable(Of BrokeredMessage))

    Parameters

    Returns

  • ReceiveBatchAsync(Int32)
    ReceiveBatchAsync(Int32)

    Asynchronously receives a batch of messages.

    public Task<IEnumerable<BrokeredMessage>> ReceiveBatchAsync(int messageCount)Public Function ReceiveBatchAsync(messageCount As Integer) As Task(Of IEnumerable(Of BrokeredMessage))

    Parameters

    • messageCount

      The number of messages to return in the batch. As this is an approximation, fewer or more messages than messageCount may be returned.

    Returns

  • ReceiveBatchAsync(Int32, TimeSpan)
    ReceiveBatchAsync(Int32, TimeSpan)

    Asynchronously receives a batch of messages.

    public Task<IEnumerable<BrokeredMessage>> ReceiveBatchAsync(int messageCount, TimeSpan serverWaitTime)Public Function ReceiveBatchAsync(messageCount As Integer, serverWaitTime As TimeSpan) As Task(Of IEnumerable(Of BrokeredMessage))

    Parameters

    • messageCount

      The number of messages to return in the batch. As this is an approximation, fewer or more messages than messageCount may be returned.

    • serverWaitTime

      The server wait time.

    Returns

Details

Assembly

Microsoft.ServiceBus.dll