QueueClient QueueClient Class

Represents the queue client object.

Syntax

Declaration

public abstract class QueueClient : ClientEntity, ICloseable, IMessageSessionEntity, IMessageClientEntity, IMessageSender, IMessageReceiver, IMessageBrowserPublic MustInherit Class QueueClient
    Inherits ClientEntity
    Implements ICloseable, IMessageSessionEntity, IMessageClientEntity, IMessageSender, IMessageReceiver, IMessageBrowser

Inheritance Hierarchy

Inherited Members

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

Properties summary

Gets or sets the messaging factory.

Gets the message receive mode when processing the received message.

Gets or sets the full path name of the queue.

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

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.

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

Accepts a message session that allows grouping of related messages for processing in a single transaction using the given session identifier.

Accepts a message session that allows grouping of related messages for processing in a single transaction using the given session identifier and wait time.

Accepts a message session that allows grouping of related messages for processing in a single transaction using the specified server wait time.

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

Asynchronously accepts a message session that allows grouping of related messages for processing in a single transaction using the given session identifier.

Asynchronously accepts a message session that allows grouping of related messages for processing in a single transaction using the given session identifier and wait time.

Asynchronously accepts a message session that allows grouping of related messages for processing in a single transaction using the specified server wait time.

Cancels a scheduled message

Completes processing of a message.

Asynchronously completes processing of a message.

Completes processing of a message batch.

Asynchronously completes processing of a message batch.

Creates a new copy of QueueClient with specified path.

Creates a new copy of QueueClient with specified path and mode.

Creates a new instance of QueueClient using the specified connection string.

Creates a new instance of QueueClient using the specified connection string and receiving mode.

Creates a new copy of QueueClient from a connection string with the specified queue path. Use this overload only when the connection string does not use the EntityPath property.

Creates a new instance of QueueClient from a connection string with the specified path and mode. Use this overload only when the connection string does not use the EntityPath property.

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.

Suspends the processing of a message.

Suspends the processing of a message.

Asynchronously suspends the processing of a message.

Asynchronously suspends the processing of a message.

Builds a format name from the specified dead letter queue path.

Gets the message sessions, enabling you to browse sessions on queues.

Retrieves all message sessions whose session state was updated since lastUpdatedTime.

Asynchronously gets the message sessions, enabling you to browse sessions on queues.

Asynchronously retrieves all message sessions whose session state was updated since lastUpdatedTime.

Executes upon calling the Abort event.

Executes when the Close operation is called.

Executes the begin create receiver action.

Executes the begin create receiver action.

Executes the begin create sender action.

Executes the BeginGetMessageSessions action.

Executes upon calling the Close action.

Executes upon calling the EndAcceptMessageSession operation.

Executes the end close action.

Executes the end create receiver action.

Executes the end create sender action.

Executes the end get message action.

Processes a message in an event-driven message pump.

Processes a message in an event-driven message pump, with the given set of OnMessageOptions options.

Asynchronously processes a message.

Asynchronously processes a message.

Returns without removing the first message in the queue.

Returns without removing the first message in the queue.

Asynchronously returns without removing the first message in the queue.

Asynchronously returns without removing the first message in the queue.

Peeks a batch of messages.

Peeks a batch of messages.

Asynchronously peeks a batch of message.

Asynchronously peeks a batch of message.

Receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

Receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

Receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

Asynchronously receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

Asynchronously receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

Asynchronously receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

Receives a message batch.

Receives a message batch.

Receives a message batch.

Asynchronously receives a message batch.

Asynchronously receives a message batch.

Asynchronously receives a message batch.

Registers the session handler with specific type.

Registers the session handler with specific type and handler options.

Asynchronously registers the session handler with specific type.

Asynchronously registers the session handler with specific type and handler options.

Registers a message session handler factory with specified options.

Registers a message session handler factory with specified options.

Asynchronously registers a message session handler factory.

Asynchronously registers a message session handler factory.

Sends a scheduled message

Sends a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalSender.

Asynchronously sends a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalSender.

Sends a set of brokered messages (for batch processing).

Asynchronously sends a set of brokered messages (for batch processing).

Properties

  • MessagingFactory
    MessagingFactory

    Gets or sets the messaging factory.

    public MessagingFactory MessagingFactory { get; }Public ReadOnly Property MessagingFactory As MessagingFactory

    Property Value

  • Mode
    Mode

    Gets the message receive mode when processing the received message.

    public ReceiveMode Mode { get; }Public ReadOnly Property Mode As ReceiveMode

    Property Value

  • Path
    Path

    Gets or sets the full path name of the queue.

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

    Property Value

  • PrefetchCount
    PrefetchCount

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

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

    Property Value

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

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.

    Exceptions

  • 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

  • AcceptMessageSession()
    AcceptMessageSession()

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

    public MessageSession AcceptMessageSession()Public Function AcceptMessageSession As MessageSession

    Returns

    Exceptions

  • AcceptMessageSession(String)
    AcceptMessageSession(String)

    Accepts a message session that allows grouping of related messages for processing in a single transaction using the given session identifier.

    public MessageSession AcceptMessageSession(string sessionId)Public Function AcceptMessageSession(sessionId As String) As MessageSession

    Parameters

    • sessionId

      The session identifier of the message session.

    Returns

    Exceptions

  • AcceptMessageSession(String, TimeSpan)
    AcceptMessageSession(String, TimeSpan)

    Accepts a message session that allows grouping of related messages for processing in a single transaction using the given session identifier and wait time.

    public MessageSession AcceptMessageSession(string sessionId, TimeSpan serverWaitTime)Public Function AcceptMessageSession(sessionId As String, serverWaitTime As TimeSpan) As MessageSession

    Parameters

    • sessionId

      The session identifier of the message session.

    • serverWaitTime

      The time span the server waits for processing messages before it times out.

    Returns

    Exceptions

  • AcceptMessageSession(TimeSpan)
    AcceptMessageSession(TimeSpan)

    Accepts a message session that allows grouping of related messages for processing in a single transaction using the specified server wait time.

    public MessageSession AcceptMessageSession(TimeSpan serverWaitTime)Public Function AcceptMessageSession(serverWaitTime As TimeSpan) As MessageSession

    Parameters

    • serverWaitTime

      The time span the server waits for processing messages before it times out.

    Returns

    Exceptions

  • AcceptMessageSessionAsync()
    AcceptMessageSessionAsync()

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

    public Task<MessageSession> AcceptMessageSessionAsync()Public Function AcceptMessageSessionAsync As Task(Of MessageSession)

    Returns

  • AcceptMessageSessionAsync(String)
    AcceptMessageSessionAsync(String)

    Asynchronously accepts a message session that allows grouping of related messages for processing in a single transaction using the given session identifier.

    public Task<MessageSession> AcceptMessageSessionAsync(string sessionId)Public Function AcceptMessageSessionAsync(sessionId As String) As Task(Of MessageSession)

    Parameters

    • sessionId

      The session identifier of the message session.

    Returns

  • AcceptMessageSessionAsync(String, TimeSpan)
    AcceptMessageSessionAsync(String, TimeSpan)

    Asynchronously accepts a message session that allows grouping of related messages for processing in a single transaction using the given session identifier and wait time.

    public Task<MessageSession> AcceptMessageSessionAsync(string sessionId, TimeSpan serverWaitTime)Public Function AcceptMessageSessionAsync(sessionId As String, serverWaitTime As TimeSpan) As Task(Of MessageSession)

    Parameters

    • sessionId

      The session identifier of the message session.

    • serverWaitTime

      The time span the server waits for processing messages before it times out.

    Returns

  • AcceptMessageSessionAsync(TimeSpan)
    AcceptMessageSessionAsync(TimeSpan)

    Asynchronously accepts a message session that allows grouping of related messages for processing in a single transaction using the specified server wait time.

    public Task<MessageSession> AcceptMessageSessionAsync(TimeSpan serverWaitTime)Public Function AcceptMessageSessionAsync(serverWaitTime As TimeSpan) As Task(Of MessageSession)

    Parameters

    • serverWaitTime

      The time span the server waits for processing messages before it times out.

    Returns

  • CancelScheduledMessageAsync(Int64)
    CancelScheduledMessageAsync(Int64)

    Cancels a scheduled message

    public Task CancelScheduledMessageAsync(long sequenceNumber)Public Function CancelScheduledMessageAsync(sequenceNumber As Long) As Task

    Parameters

    • sequenceNumber

      Returned on scheduling a message.

    Returns

  • Complete(Guid)
    Complete(Guid)

    Completes processing of a message.

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

    Parameters

    • lockToken

      The lock token bound to the locked message instance.

    Exceptions

  • CompleteAsync(Guid)
    CompleteAsync(Guid)

    Asynchronously completes processing of a message.

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

    Parameters

    • lockToken

      The lock token bound to the locked message instance.

    Returns

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

    Completes processing of a message batch.

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

    Parameters

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

    Asynchronously completes processing of a message batch.

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

    Parameters

    Returns

  • Create(String)
    Create(String)

    Creates a new copy of QueueClient with specified path.

    public static QueueClient Create(string path)Public Shared Function Create(path As String) As QueueClient

    Parameters

    Returns

  • Create(String, ReceiveMode)
    Create(String, ReceiveMode)

    Creates a new copy of QueueClient with specified path and mode.

    public static QueueClient Create(string path, ReceiveMode mode)Public Shared Function Create(path As String, mode As ReceiveMode) As QueueClient

    Parameters

    Returns

  • CreateFromConnectionString(String)
    CreateFromConnectionString(String)

    Creates a new instance of QueueClient using the specified connection string.

    public static QueueClient CreateFromConnectionString(string connectionString)Public Shared Function CreateFromConnectionString(connectionString As String) As QueueClient

    Parameters

    • connectionString

      The connection string to use.

    Returns

    Exceptions

  • CreateFromConnectionString(String, ReceiveMode)
    CreateFromConnectionString(String, ReceiveMode)

    Creates a new instance of QueueClient using the specified connection string and receiving mode.

    public static QueueClient CreateFromConnectionString(string connectionString, ReceiveMode mode)Public Shared Function CreateFromConnectionString(connectionString As String, mode As ReceiveMode) As QueueClient

    Parameters

    Returns

    Exceptions

  • CreateFromConnectionString(String, String)
    CreateFromConnectionString(String, String)

    Creates a new copy of QueueClient from a connection string with the specified queue path. Use this overload only when the connection string does not use the EntityPath property.

    public static QueueClient CreateFromConnectionString(string connectionString, string path)Public Shared Function CreateFromConnectionString(connectionString As String, path As String) As QueueClient

    Parameters

    Returns

    Exceptions

  • CreateFromConnectionString(String, String, ReceiveMode)
    CreateFromConnectionString(String, String, ReceiveMode)

    Creates a new instance of QueueClient from a connection string with the specified path and mode. Use this overload only when the connection string does not use the EntityPath property.

    public static QueueClient CreateFromConnectionString(string connectionString, string path, ReceiveMode mode)Public Shared Function CreateFromConnectionString(connectionString As String, path As String, mode As ReceiveMode) As QueueClient

    Parameters

    Returns

    Exceptions

  • 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.

    Exceptions

  • 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.

    Exceptions

  • 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)

    Suspends the processing of a message.

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

    Parameters

    • lockToken

      The lock token bound to the locked message instance.

    Exceptions

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

    Suspends the processing of a 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 suspends the processing of a message.

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

    Parameters

    • lockToken

      The lock token bound to the locked message instance.

    Returns

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

    Asynchronously suspends the processing of a 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

  • FormatDeadLetterPath(String)
    FormatDeadLetterPath(String)

    Builds a format name from the specified dead letter queue path.

    public static string FormatDeadLetterPath(string queuePath)Public Shared Function FormatDeadLetterPath(queuePath As String) As String

    Parameters

    • queuePath

      The path to the dead letter queue.

    Returns

    • The String resulted from building the format name for the specified dead letter queue path.

  • FormatTransferDeadLetterPath(String)
    FormatTransferDeadLetterPath(String)
    public static string FormatTransferDeadLetterPath(string queuePath)Public Shared Function FormatTransferDeadLetterPath(queuePath As String) As String

    Parameters

    Returns

  • GetMessageSessions()
    GetMessageSessions()

    Gets the message sessions, enabling you to browse sessions on queues.

    public IEnumerable<MessageSession> GetMessageSessions()Public Function GetMessageSessions As IEnumerable(Of MessageSession)

    Returns

  • GetMessageSessions(DateTime)
    GetMessageSessions(DateTime)

    Retrieves all message sessions whose session state was updated since lastUpdatedTime.

    public IEnumerable<MessageSession> GetMessageSessions(DateTime lastUpdatedTime)Public Function GetMessageSessions(lastUpdatedTime As Date) As IEnumerable(Of MessageSession)

    Parameters

    Returns

  • GetMessageSessionsAsync()
    GetMessageSessionsAsync()

    Asynchronously gets the message sessions, enabling you to browse sessions on queues.

    public Task<IEnumerable<MessageSession>> GetMessageSessionsAsync()Public Function GetMessageSessionsAsync As Task(Of IEnumerable(Of MessageSession))

    Returns

  • GetMessageSessionsAsync(DateTime)
    GetMessageSessionsAsync(DateTime)

    Asynchronously retrieves all message sessions whose session state was updated since lastUpdatedTime.

    public Task<IEnumerable<MessageSession>> GetMessageSessionsAsync(DateTime lastUpdatedTime)Public Function GetMessageSessionsAsync(lastUpdatedTime As Date) As Task(Of IEnumerable(Of MessageSession))

    Parameters

    Returns

  • OnAbort()
    OnAbort()

    Executes upon calling the Abort event.

    protected override void OnAbort()Protected Overrides Sub OnAbort
  • OnBeginAcceptMessageSession(String, ReceiveMode, Int32, TimeSpan, TimeSpan, AsyncCallback, Object)
    OnBeginAcceptMessageSession(String, ReceiveMode, Int32, TimeSpan, TimeSpan, AsyncCallback, Object)
    protected abstract IAsyncResult OnBeginAcceptMessageSession(string sessionId, ReceiveMode receiveMode, int prefetchCount, TimeSpan serverWaitTime, TimeSpan timeout, AsyncCallback callback, object state)Protected MustOverride Function OnBeginAcceptMessageSession(sessionId As String, receiveMode As ReceiveMode, prefetchCount As Integer, serverWaitTime As TimeSpan, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    Returns

  • OnBeginClose(TimeSpan, AsyncCallback, Object)
    OnBeginClose(TimeSpan, AsyncCallback, Object)

    Executes when the Close operation is called.

    protected override IAsyncResult OnBeginClose(TimeSpan timeout, AsyncCallback callback, object state)Protected Overrides Function OnBeginClose(timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    • timeout

      The maximum time before the close operation times out.

    • callback

      An AsyncCallback delegate that references the method to invoke when the operation is complete.

    • state

      A user-defined object that contains information about the receive operation. This object is passed to the EndClose delegate when the operation is complete.

    Returns

  • OnBeginCreateReceiver(ReceiveMode, TimeSpan, AsyncCallback, Object)
    OnBeginCreateReceiver(ReceiveMode, TimeSpan, AsyncCallback, Object)

    Executes the begin create receiver action.

    protected abstract IAsyncResult OnBeginCreateReceiver(ReceiveMode receiveMode, TimeSpan timeout, AsyncCallback callback, object state)Protected MustOverride Function OnBeginCreateReceiver(receiveMode As ReceiveMode, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    • receiveMode

      The message ReceiveMode receive mode.

    • timeout

      The maximum time before this operation times out.

    • callback

      An AsyncCallback delegate that references the method to invoke when the operation is complete.

    • state

      A user-defined object that contains information about the receive operation. This object is passed to the Microsoft.ServiceBus.Messaging.QueueClient.EndCreateReceiver(System.IAsyncResult) delegate when the operation is complete.

    Returns

  • OnBeginCreateReceiver(String, ReceiveMode, TimeSpan, AsyncCallback, Object)
    OnBeginCreateReceiver(String, ReceiveMode, TimeSpan, AsyncCallback, Object)

    Executes the begin create receiver action.

    protected abstract IAsyncResult OnBeginCreateReceiver(string subQueueName, ReceiveMode receiveMode, TimeSpan timeout, AsyncCallback callback, object state)Protected MustOverride Function OnBeginCreateReceiver(subQueueName As String, receiveMode As ReceiveMode, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    • subQueueName

      Name of the sub-queue.

    • receiveMode

      The message ReceiveMode receive mode.

    • timeout

      The maximum time before this operation times out.

    • callback

      An AsyncCallback delegate that references the method to invoke when the operation is complete.

    • state

      A user-defined object that contains information about the receive operation. This object is passed to the Microsoft.ServiceBus.Messaging.QueueClient.EndCreateReceiver(System.IAsyncResult) delegate when the operation is complete.

    Returns

  • OnBeginCreateSender(TimeSpan, AsyncCallback, Object)
    OnBeginCreateSender(TimeSpan, AsyncCallback, Object)

    Executes the begin create sender action.

    protected abstract IAsyncResult OnBeginCreateSender(TimeSpan timeout, AsyncCallback callback, object state)Protected MustOverride Function OnBeginCreateSender(timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    • timeout

      The maximum time before this operation times out.

    • callback

      An AsyncCallback delegate that references the method to invoke when the operation is complete.

    • state

      A user-defined object that contains information about the receive operation. This object is passed to the Microsoft.ServiceBus.Messaging.QueueClient.EndCreateSender(System.IAsyncResult) delegate when the operation is complete.

    Returns

  • OnBeginGetMessageSessions(DateTime, AsyncCallback, Object)
    OnBeginGetMessageSessions(DateTime, AsyncCallback, Object)

    Executes the BeginGetMessageSessions action.

    protected abstract IAsyncResult OnBeginGetMessageSessions(DateTime lastUpdatedTime, AsyncCallback callback, object state)Protected MustOverride Function OnBeginGetMessageSessions(lastUpdatedTime As Date, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    Returns

  • OnClose(TimeSpan)
    OnClose(TimeSpan)

    Executes upon calling the Close action.

    protected override void OnClose(TimeSpan timeout)Protected Overrides Sub OnClose(timeout As TimeSpan)

    Parameters

    • timeout

      The maximum time before the close operation times out.

  • OnEndAcceptMessageSession(IAsyncResult)
    OnEndAcceptMessageSession(IAsyncResult)

    Executes upon calling the EndAcceptMessageSession operation.

    protected abstract MessageSession OnEndAcceptMessageSession(IAsyncResult result)Protected MustOverride Function OnEndAcceptMessageSession(result As IAsyncResult) As MessageSession

    Parameters

    Returns

  • OnEndClose(IAsyncResult)
    OnEndClose(IAsyncResult)

    Executes the end close action.

    protected override void OnEndClose(IAsyncResult result)Protected Overrides Sub OnEndClose(result As IAsyncResult)

    Parameters

  • OnEndCreateReceiver(IAsyncResult)
    OnEndCreateReceiver(IAsyncResult)

    Executes the end create receiver action.

    protected abstract MessageReceiver OnEndCreateReceiver(IAsyncResult result)Protected MustOverride Function OnEndCreateReceiver(result As IAsyncResult) As MessageReceiver

    Parameters

    • result

      The result of the asynchronous Microsoft.ServiceBus.Messaging.QueueClient.EndCreateReceiver(System.IAsyncResult) operation.

    Returns

  • OnEndCreateSender(IAsyncResult)
    OnEndCreateSender(IAsyncResult)

    Executes the end create sender action.

    protected abstract MessageSender OnEndCreateSender(IAsyncResult result)Protected MustOverride Function OnEndCreateSender(result As IAsyncResult) As MessageSender

    Parameters

    Returns

  • OnEndGetMessageSessions(IAsyncResult)
    OnEndGetMessageSessions(IAsyncResult)

    Executes the end get message action.

    protected abstract IEnumerable<MessageSession> OnEndGetMessageSessions(IAsyncResult result)Protected MustOverride Function OnEndGetMessageSessions(result As IAsyncResult) As IEnumerable(Of MessageSession)

    Parameters

    Returns

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

    Processes a message in an event-driven message pump.

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

    Parameters

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

    Processes a message in an event-driven message pump, with the given set of OnMessageOptions options.

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

    Parameters

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

    Asynchronously processes a message.

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

    Parameters

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

    Asynchronously processes a message.

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

    Parameters

  • Peek()
    Peek()

    Returns without removing the first message in the queue.

    public BrokeredMessage Peek()Public Function Peek As BrokeredMessage

    Returns

  • Peek(Int64)
    Peek(Int64)

    Returns without removing the first message in the queue.

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

    Parameters

    • fromSequenceNumber

      The starting point from which to browse a message.

    Returns

  • PeekAsync()
    PeekAsync()

    Asynchronously returns without removing the first message in the queue.

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

    Returns

  • PeekAsync(Int64)
    PeekAsync(Int64)

    Asynchronously returns without removing the first message in the queue.

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

    Parameters

    • fromSequenceNumber

      The sequence number from where to peek a message.

    Returns

  • PeekBatch(Int32)
    PeekBatch(Int32)

    Peeks a batch of messages.

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

    Parameters

    • messageCount

      The number of messages.

    Returns

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

    Peeks a batch of messages.

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

    Parameters

    • fromSequenceNumber

      The starting point from which to browse a batch of messages.

    • messageCount

      The number of messages.

    Returns

  • PeekBatchAsync(Int32)
    PeekBatchAsync(Int32)

    Asynchronously peeks a batch of message.

    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 peeks a batch of message.

    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 peek a batch of message.

    • messageCount

      The number of message.

    Returns

  • Receive()
    Receive()

    Receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

    public BrokeredMessage Receive()Public Function Receive As BrokeredMessage

    Returns

    Exceptions

  • Receive(Int64)
    Receive(Int64)

    Receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

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

    Parameters

    • sequenceNumber

      The sequence number of the deferred message to receive.

    Returns

    Exceptions

  • Receive(TimeSpan)
    Receive(TimeSpan)

    Receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

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

    Parameters

    • serverWaitTime

      The time span the server waits for receiving a message before it times out.

    Returns

    Exceptions

  • ReceiveAsync()
    ReceiveAsync()

    Asynchronously receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

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

    Returns

  • ReceiveAsync(Int64)
    ReceiveAsync(Int64)

    Asynchronously receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

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

    Parameters

    • sequenceNumber

      The sequence number of the deferred message to receive.

    Returns

  • ReceiveAsync(TimeSpan)
    ReceiveAsync(TimeSpan)

    Asynchronously receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

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

    Parameters

    • serverWaitTime

      The time span the server waits for receiving a message before it times out.

    Returns

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

    Receives a message batch.

    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 message batch.

    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 message batch.

    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 receive in a batch.As this is an approximation, fewer or more messages than messageCount may be returned.

    • serverWaitTime

      The time span that the server will wait for the message batch to arrive before it times out.

    Returns

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

    Asynchronously receives a message batch.

    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 message batch.

    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 message batch.

    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 time span that the server will wait for the message batch to arrive before it times out.

    Returns

  • RegisterSessionHandler(Type)
    RegisterSessionHandler(Type)

    Registers the session handler with specific type.

    public void RegisterSessionHandler(Type handlerType)Public Sub RegisterSessionHandler(handlerType As Type)

    Parameters

    • handlerType

      The handler type.

  • RegisterSessionHandler(Type, SessionHandlerOptions)
    RegisterSessionHandler(Type, SessionHandlerOptions)

    Registers the session handler with specific type and handler options.

    public void RegisterSessionHandler(Type handlerType, SessionHandlerOptions options)Public Sub RegisterSessionHandler(handlerType As Type, options As SessionHandlerOptions)

    Parameters

  • RegisterSessionHandlerAsync(Type)
    RegisterSessionHandlerAsync(Type)

    Asynchronously registers the session handler with specific type.

    public Task RegisterSessionHandlerAsync(Type handlerType)Public Function RegisterSessionHandlerAsync(handlerType As Type) As Task

    Parameters

    • handlerType

      The handler type.

    Returns

    • The task object representing the asynchronous operation.

  • RegisterSessionHandlerAsync(Type, SessionHandlerOptions)
    RegisterSessionHandlerAsync(Type, SessionHandlerOptions)

    Asynchronously registers the session handler with specific type and handler options.

    public Task RegisterSessionHandlerAsync(Type handlerType, SessionHandlerOptions options)Public Function RegisterSessionHandlerAsync(handlerType As Type, options As SessionHandlerOptions) As Task

    Parameters

    Returns

    • The task object representing the asynchronous operation.

  • RegisterSessionHandlerFactory(IMessageSessionAsyncHandlerFactory, SessionHandlerOptions)
    RegisterSessionHandlerFactory(IMessageSessionAsyncHandlerFactory, SessionHandlerOptions)

    Registers a message session handler factory with specified options.

    public void RegisterSessionHandlerFactory(IMessageSessionAsyncHandlerFactory factory, SessionHandlerOptions options)Public Sub RegisterSessionHandlerFactory(factory As IMessageSessionAsyncHandlerFactory, options As SessionHandlerOptions)

    Parameters

  • RegisterSessionHandlerFactory(IMessageSessionHandlerFactory, SessionHandlerOptions)
    RegisterSessionHandlerFactory(IMessageSessionHandlerFactory, SessionHandlerOptions)

    Registers a message session handler factory with specified options.

    public void RegisterSessionHandlerFactory(IMessageSessionHandlerFactory factory, SessionHandlerOptions options)Public Sub RegisterSessionHandlerFactory(factory As IMessageSessionHandlerFactory, options As SessionHandlerOptions)

    Parameters

  • RegisterSessionHandlerFactoryAsync(IMessageSessionAsyncHandlerFactory, SessionHandlerOptions)
    RegisterSessionHandlerFactoryAsync(IMessageSessionAsyncHandlerFactory, SessionHandlerOptions)

    Asynchronously registers a message session handler factory.

    public Task RegisterSessionHandlerFactoryAsync(IMessageSessionAsyncHandlerFactory factory, SessionHandlerOptions options)Public Function RegisterSessionHandlerFactoryAsync(factory As IMessageSessionAsyncHandlerFactory, options As SessionHandlerOptions) As Task

    Parameters

    Returns

    • The task object representing the asynchronous operation.

  • RegisterSessionHandlerFactoryAsync(IMessageSessionHandlerFactory, SessionHandlerOptions)
    RegisterSessionHandlerFactoryAsync(IMessageSessionHandlerFactory, SessionHandlerOptions)

    Asynchronously registers a message session handler factory.

    public Task RegisterSessionHandlerFactoryAsync(IMessageSessionHandlerFactory factory, SessionHandlerOptions options)Public Function RegisterSessionHandlerFactoryAsync(factory As IMessageSessionHandlerFactory, options As SessionHandlerOptions) As Task

    Parameters

    Returns

    • The task object representing the asynchronous operation.

  • RenewMessageLock(Guid)
    RenewMessageLock(Guid)
    public DateTime RenewMessageLock(Guid lockToken)Public Function RenewMessageLock(lockToken As Guid) As Date

    Parameters

    Returns

  • RenewMessageLockAsync(Guid)
    RenewMessageLockAsync(Guid)
    public Task<DateTime> RenewMessageLockAsync(Guid lockToken)Public Function RenewMessageLockAsync(lockToken As Guid) As Task(Of Date)

    Parameters

    Returns

  • ScheduleMessageAsync(BrokeredMessage, DateTimeOffset)
    ScheduleMessageAsync(BrokeredMessage, DateTimeOffset)

    Sends a scheduled message

    public Task<long> ScheduleMessageAsync(BrokeredMessage message, DateTimeOffset scheduleEnqueueTimeUtc)Public Function ScheduleMessageAsync(message As BrokeredMessage, scheduleEnqueueTimeUtc As DateTimeOffset) As Task(Of Long)

    Parameters

    Returns

  • Send(BrokeredMessage)
    Send(BrokeredMessage)

    Sends a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalSender.

    public void Send(BrokeredMessage message)Public Sub Send(message As BrokeredMessage)

    Parameters

    Exceptions

  • SendAsync(BrokeredMessage)
    SendAsync(BrokeredMessage)

    Asynchronously sends a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalSender.

    public Task SendAsync(BrokeredMessage message)Public Function SendAsync(message As BrokeredMessage) As Task

    Parameters

    Returns

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

    Sends a set of brokered messages (for batch processing).

    public void SendBatch(IEnumerable<BrokeredMessage> messages)Public Sub SendBatch(messages As IEnumerable(Of BrokeredMessage))

    Parameters

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

    Asynchronously sends a set of brokered messages (for batch processing).

    public Task SendBatchAsync(IEnumerable<BrokeredMessage> messages)Public Function SendBatchAsync(messages As IEnumerable(Of BrokeredMessage)) As Task

    Parameters

    Returns

Details

Assembly

Microsoft.ServiceBus.dll