QueueClient QueueClient Class

Definition

Represents the queue client object.

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

Inherited Members

Microsoft.ServiceBus.Messaging.ClientEntity

System.Object

Properties

MessagingFactory MessagingFactory

Gets or sets the messaging factory.

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

The messaging factory.

Mode Mode

Gets the message receive mode when processing the received message.

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

The message ReceiveMode when processing the received message.

Path Path

Gets or sets the full path name of the queue.

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

The queue path relative to the MessagingFactory base address.

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
Value
Int32 Int32

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

Remarks

Takes effect on the next receive call to the server.

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
Guid Guid

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

Exceptions

Thrown if the operation exceeded the timeout value set by OperationTimeout.

Thrown if the client entity has been closed or aborted.

Remarks

When the client fails to get the message from the queue/topic, this method should be called. The Service Bus will increment the delivery count of the message. The client now can either attempt to receive the message again or move it to the dead-letter queue.

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
lockToken
Guid Guid

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

propertiesToModify
IDictionary<String, Object> IDictionary(Of String, Object)

The properties of the message to modify.

Remarks

When the client fails to get the message from the queue/topic, this method should be called. The Service Bus will increment the delivery count of the message. The client now can either attempt to receive the message again or move it to the dead-letter queue.

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
Guid Guid

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

Returns

The discarded message.

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
lockToken
Guid Guid

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

propertiesToModify
IDictionary<String, Object> IDictionary(Of String, Object)

The properties of the message to modify.

Returns

The discarded message.

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

A MessageSession that allows grouping of related messages for processing in a single transaction.

Exceptions

Thrown if the operation exceeded the timeout value set by OperationTimeout.

Thrown if the client is already closed, aborted, or disposed.

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
String String

The session identifier of the message session.

Returns

A MessageSession that allows grouping of related messages for processing in a single transaction.

Exceptions

Thrown if sessionId is null, empty, or white spaces.

Thrown if the operation exceeded the timeout value set by OperationTimeout.

Thrown if the client is already closed, aborted, or disposed.

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
String String

The session identifier of the message session.

serverWaitTime
TimeSpan TimeSpan

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

Returns

A MessageSession that allows grouping of related messages for processing in a single transaction.

Exceptions

Thrown if sessionId is null, empty, or white spaces.

Thrown if serverWaitTime is not a positive TimeSpan value.

Thrown if the operation exceeded the timeout value set by OperationTimeout.

Thrown if the client is already closed, aborted, or disposed.

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
TimeSpan TimeSpan

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

Returns

A MessageSession that allows grouping of related messages for processing in a single transaction.

Exceptions

Thrown if serverWaitTime is not a positive TimeSpan value.

Thrown if the operation exceeded the timeout value set by serverWaitTime.

Thrown if the client is already closed, aborted, or disposed.

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

The result of an asynchronous operation.

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
String String

The session identifier of the message session.

Returns

The result of an asynchronous operation.

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
String String

The session identifier of the message session.

serverWaitTime
TimeSpan TimeSpan

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

Returns

The result of an asynchronous operation.

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
TimeSpan TimeSpan

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

Returns

The result of an asynchronous operation.

CancelScheduledMessageAsync(Int64) CancelScheduledMessageAsync(Int64)

Cancels a scheduled message

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

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
Guid Guid

The lock token bound to the locked message instance.

Exceptions

Thrown if the operation exceeded the timeout value set by OperationTimeout

Thrown if the client entity has been closed or aborted.

Thrown if the message represented by the lockToken has lost the message lock.

Remarks

This method is used as a handshake between the client and Service Bus for a guaranteed delivery of the message. If the client failed before calling this method, the message will be kept in the queue.

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
Guid Guid

The lock token bound to the locked message instance.

Returns

The asynchronous operation.

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
lockTokens
IEnumerable<Guid> IEnumerable(Of Guid)

The lock tokens associated with locked messages in the batch.

Remarks

This method is used as a handshake between the client and Service Bus for a guaranteed delivery of the message. If the client failed before calling this method, the message will be kept in the queue.

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
lockTokens
IEnumerable<Guid> IEnumerable(Of Guid)

The lock tokens associated with locked messages in the batch.

Returns

The asynchronous operation.

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
path
String String

The path.

Returns

Remarks

This method will attempt to retrieve the connection string information from either app.config, or web.config files. User must supply the connection string using the "AppSettings" section of the configuration. The format of the section is as follows:




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
path
String String

The path.

mode
ReceiveMode ReceiveMode

The mode.

Returns

Remarks

This method will attempt to retrieve the connection string information from either app.config, or web.config files. User must supply the connection string using the "AppSettings" section of the configuration. The format of the section is as follows:




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
String String

The connection string to use.

Returns

The newly created QueueClient instance.

Exceptions

Thrown when the format of the connectionString parameter is incorrect.

Remarks

This method expects the connection string supplied has entity level information such as the entity path and authentication information supplied.

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
connectionString
String String

The connection string to use.

Returns

The newly created QueueClient instance.

Exceptions

Thrown when the format of the connectionString parameter is incorrect.

Remarks

This method expects the connection string supplied has entity level information such as the entity path and authentication information supplied.

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
connectionString
String String

The connection string used.

path
String String

The path to the queue.

Returns
Exceptions

Thrown when the format of the connectionString parameter is incorrect.

Remarks

This method should only be used with a connection string that has namespace level authentication because the connection string supplied should not have entity level information associated with it.

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
connectionString
String String

The connection string.

path
String String

The path to the queue.

Returns
Exceptions

Thrown when the format of the connectionString parameter is incorrect.

Remarks

This method should only be used with a connection string that has namespace level authentication because the connection string supplied should not have entity level information associated with it.

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
Guid Guid

The lock token bound to the locked message instance.

Exceptions

Thrown if the operation exceeded the timeout value set by OperationTimeout

Thrown if the client entity has been closed or aborted.

Thrown if the message represented by the lockToken has lost the message lock.

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
lockToken
Guid Guid

The lock token bound to the locked message instance.

propertiesToModify
IDictionary<String, Object> IDictionary(Of String, Object)

The properties of the message to modify.

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
Guid Guid

The lock token bound to the locked message instance.

deadLetterReason
String String

The reason for deadlettering the message.

deadLetterErrorDescription
String String

The error description for deadlettering the message.

Exceptions

Thrown if the operation exceeded the timeout value set by OperationTimeout

Thrown if the client entity has been closed or aborted.

Thrown if the message represented by the lockToken has lost the message lock.

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
Guid Guid

The lock token bound to the locked message instance.

Returns

The asynchronous operation.

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
lockToken
Guid Guid

The lock token bound to the locked message instance.

propertiesToModify
IDictionary<String, Object> IDictionary(Of String, Object)

The properties of the message to modify.

Returns

The asynchronous operation.

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
Guid Guid

The lock token bound to the locked message instance.

deadLetterReason
String String

The reason for deadlettering the message.

deadLetterErrorDescription
String String

The error description for deadlettering the message.

Returns

The asynchronous operation.

Defer(Guid) Defer(Guid)

Suspends the processing of a message.

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

The lock token bound to the locked message instance.

Exceptions

Thrown if the operation exceeded the timeout value set by OperationTimeout

Thrown if the client entity has been closed or aborted.

Thrown if the message represented by the lockToken has lost the message lock.

Remarks

Before deferring, you should set aside the message receipt for later retrieval.

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
lockToken
Guid Guid

The lock token bound to the locked message instance.

propertiesToModify
IDictionary<String, Object> IDictionary(Of String, Object)

The properties of the message to modify.

Remarks

Before deferring, you should set aside the message receipt for later retrieval.

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
Guid Guid

The lock token bound to the locked message instance.

Returns

The asynchronous operation.

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
lockToken
Guid Guid

The lock token bound to the locked message instance.

propertiesToModify
IDictionary<String, Object> IDictionary(Of String, Object)

The properties of the message to modify.

Returns

The asynchronous operation.

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
String String

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)

Utility method that creates the name for the transfer dead letter receiver, specified by queuePath.

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

The path to the transfer dead letter receiver queue.

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
lastUpdatedTime
DateTime DateTime

The time the session was last updated.

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

The asynchronous operation.

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
lastUpdatedTime
DateTime DateTime

The time the session was last updated.

Returns

The asynchronous operation.

OnAbort() OnAbort()

Executes upon calling the Abort event.

protected override void OnAbort()Protected Overrides Sub OnAbort
Overrides

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
sessionId
String String
receiveMode
ReceiveMode ReceiveMode
prefetchCount
Int32 Int32
serverWaitTime
TimeSpan TimeSpan
timeout
TimeSpan TimeSpan
state
Object Object
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
TimeSpan TimeSpan

The maximum time before the close operation times out.

callback
AsyncCallback AsyncCallback

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

state
Object Object

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

An IAsyncResult object that references the asynchronous parent method.

Overrides

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
ReceiveMode ReceiveMode

The message ReceiveMode receive mode.

timeout
TimeSpan TimeSpan

The maximum time before this operation times out.

callback
AsyncCallback AsyncCallback

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

state
Object Object

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

An IAsyncResult object that references the asynchronous parent method.

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
String String

Name of the sub-queue.

receiveMode
ReceiveMode ReceiveMode

The message ReceiveMode receive mode.

timeout
TimeSpan TimeSpan

The maximum time before this operation times out.

callback
AsyncCallback AsyncCallback

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

state
Object Object

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

An IAsyncResult object that references the asynchronous parent method.

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
TimeSpan TimeSpan

The maximum time before this operation times out.

callback
AsyncCallback AsyncCallback

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

state
Object Object

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

An IAsyncResult object that references the asynchronous parent method

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
lastUpdatedTime
DateTime DateTime

The date and time of the last update.

callback
AsyncCallback AsyncCallback

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

state
Object Object

A user-defined object that contains state information about the asynchronous operation.

Returns

An IAsyncResult that references the asynchronous operation to get the message sessions.

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
TimeSpan TimeSpan

The maximum time before the close operation times out.

Overrides

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
result
IAsyncResult IAsyncResult

An IAsyncResult that represents the status of the asynchronous accept message session operation.

Returns

The MessageSession that allows grouping of related messages for processing in a single transaction.

OnEndClose(IAsyncResult) OnEndClose(IAsyncResult)

Executes the end close action.

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

The result of the asynchronous parent method.

Overrides

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
IAsyncResult IAsyncResult

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
result
IAsyncResult IAsyncResult

An IAsyncResult object that references the asynchronous parent method.

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
result
IAsyncResult IAsyncResult

The result of the session.

Returns

The MessageSession that allows grouping of related messages for processing in a single transaction.

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
callback
Action<BrokeredMessage> Action(Of BrokeredMessage)

The method to invoke when the operation is complete.

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
callback
Action<BrokeredMessage> Action(Of BrokeredMessage)

The method to invoke when the operation is complete.

onMessageOptions
OnMessageOptions OnMessageOptions

Specifies the OnMessageOptions options with which to instantiate the message pump.

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
callback
Func<BrokeredMessage, Task> Func(Of BrokeredMessage, Task)

The method to invoke when the operation is complete.

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
callback
Func<BrokeredMessage, Task> Func(Of BrokeredMessage, Task)

The method to invoke when the operation is complete.

onMessageOptions
OnMessageOptions OnMessageOptions

Calls a message option.

Peek() Peek()

Returns without removing the first message in the queue.

public BrokeredMessage Peek()Public Function Peek As BrokeredMessage
Returns

A brokered message. Returns all properties and the message body.

Remarks

A Null can be return by this API if operation exceeded the timeout specified, or the operations succeeded but there are no more messages to be received.

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
Int64 Int64

The starting point from which to browse a message.

Returns

The brokered message.

Remarks

A Null can be return by this API if operation exceeded the timeout specified, or the operations succeeded but there are no more messages to be received.

PeekAsync() PeekAsync()

Asynchronously returns without removing the first message in the queue.

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

The asynchronous operation.

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
Int64 Int64

The sequence number from where to peek a message.

Returns

The asynchronous operation.

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
Int32 Int32

The number of messages.

Returns

A batch of messages peeked. Returns all properties and the message body.

Remarks

A Null can be return by this API if operation exceeded the timeout specified, or the operations succeeded but there are no more messages to be received.

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
Int64 Int64

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

messageCount
Int32 Int32

The number of messages.

Returns

A batch of messages peeked.

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
messageCount
Int32 Int32

The number of message.

Returns

The asynchronous operation.

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
Int64 Int64

The sequence number from where to peek a batch of message.

messageCount
Int32 Int32

The number of message.

Returns

The asynchronous operation.

Receive() Receive()

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

public BrokeredMessage Receive()Public Function Receive As BrokeredMessage
Returns

The BrokeredMessage that represents the received message. If no message is available to be received, the method returns NULL, and you can retry the operation at a later time.

Exceptions

Thrown if the client entity has been closed or aborted.

Thrown if the message receive operation times out.

Thrown if an I/O or security error occurs.

Thrown if the messaging entity associated with the operation does not exist or it has been deleted.

Thrown if the user code has performed some unexpected operations, or the Service Bus gateway is down. Check the exception message for the actual error.

Remarks

A Null can be return by this API if operation exceeded the timeout specified, or the operations succeeded but there are no more messages to be received.

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
Int64 Int64

The sequence number of the deferred message to receive.

Returns

The BrokeredMessage that represents the received message. If no message is available to be received, the method returns NULL, and you can retry the operation at a later time.

Exceptions

Thrown if the client entity has been closed or aborted.

Remarks

A Null can be return by this API if operation exceeded the timeout specified, or the operations succeeded but the message with the requested sequenceNumber cannot be located.

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
TimeSpan TimeSpan

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

Returns

The BrokeredMessage that represents the received message. If no message is available to be received, the method returns NULL, and you can retry the operation at a later time.

Exceptions

Thrown if the serverWaitTime is negative.

Thrown if the message receive operation times out.

Thrown if the client entity has been closed or aborted.

Thrown if an I/O or security error occurs.

Thrown if the messaging entity associated with the operation does not exist or it has been deleted.

Thrown if the user code has performed some unexpected operations, or the Service Bus gateway is down. Check the exception message for the actual error.

Remarks

A Null can be return by this API if operation exceeded the timeout specified, or the operations succeeded but there are no more messages to be received.

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

The asynchronous operation.

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
Int64 Int64

The sequence number of the deferred message to receive.

Returns

The asynchronous operation.

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
TimeSpan TimeSpan

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

Returns

The asynchronous operation.

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
sequenceNumbers
IEnumerable<Int64> IEnumerable(Of Int64)

The sequence numbers associated with the messages in the batch.

Returns

Remarks

A Null can be return by this API if operation exceeded the timeout specified, or the operations succeeded but the message with the requested sequenceNumber cannot be located.

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
Int32 Int32

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

Returns

Remarks

A Null can be return by this API if operation exceeded the timeout specified, or the operations succeeded but there are no more messages to be received.

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
Int32 Int32

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

serverWaitTime
TimeSpan TimeSpan

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

Returns

Remarks

A Null can be return by this API if operation exceeded the timeout specified, or the operations succeeded but there are no more messages to be received.

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
sequenceNumbers
IEnumerable<Int64> IEnumerable(Of Int64)

The sequence numbers associated with the messages in the batch.

Returns

The asynchronous operation.

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
Int32 Int32

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

Returns

The asynchronous operation.

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
Int32 Int32

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

serverWaitTime
TimeSpan TimeSpan

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

Returns

The asynchronous operation.

RegisterSessionHandler(Type) RegisterSessionHandler(Type)

Registers the session handler with specific type.

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

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
handlerType
Type Type

The handler type.

options
SessionHandlerOptions SessionHandlerOptions

The session handler options.

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
Type Type

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
handlerType
Type Type

The handler type.

options
SessionHandlerOptions SessionHandlerOptions

The session handler options.

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
factory
IMessageSessionAsyncHandlerFactory IMessageSessionAsyncHandlerFactory

The handler factory to be registered.

options
SessionHandlerOptions SessionHandlerOptions

The handler options.

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
factory
IMessageSessionHandlerFactory IMessageSessionHandlerFactory

The handler factory to be registered.

options
SessionHandlerOptions SessionHandlerOptions

The handler options.

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
factory
IMessageSessionAsyncHandlerFactory IMessageSessionAsyncHandlerFactory

The handler factory to be registered.

options
SessionHandlerOptions SessionHandlerOptions

The handler options.

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
factory
IMessageSessionHandlerFactory IMessageSessionHandlerFactory

The handler factory to be registered.

options
SessionHandlerOptions SessionHandlerOptions

The handler options.

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
lockToken
Guid Guid
Returns

RenewMessageLockAsync(Guid) RenewMessageLockAsync(Guid)

public Task<DateTime> RenewMessageLockAsync(Guid lockToken)Public Function RenewMessageLockAsync(lockToken As Guid) As Task(Of Date)
Parameters
lockToken
Guid Guid
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
message
BrokeredMessage BrokeredMessage

Message to be scheduled

scheduleEnqueueTimeUtc
DateTimeOffset DateTimeOffset

Time of enqueue

Returns

Sequence number that is needed for cancelling.

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
message
BrokeredMessage BrokeredMessage

The message to send.

Exceptions

Thrown when operation times out. Timeout period is initialized through the MessagingFactorySettings may need to increase the value of OperationTimeout to avoid this exception if timeout value is relatively low.

Thrown when the message is null.

Thrown if the message has already been sent by a QueueClient or MessageSender once already.

Thrown if the topic/subscription pointed to does not support the send operation. That is, Deadletter queue does not support send operations.

Thrown if the client entity has been closed or aborted.

Thrown if there is an I/O or security error.

Thrown when an error occurs during serialization or deserialization.

Thrown if there is a messaging error.

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
message
BrokeredMessage BrokeredMessage

The message to send.

Returns

The asynchronous operation.

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
messages
IEnumerable<BrokeredMessage> IEnumerable(Of BrokeredMessage)

The collection of brokered messages to send.

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
messages
IEnumerable<BrokeredMessage> IEnumerable(Of BrokeredMessage)

The collection of brokered messages to send.

Returns

The asynchronous operation.