SubscriptionClient SubscriptionClient Class

Represents the anchor class used in run-time operations related to a topic subscription.

Syntax

Declaration

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

Inheritance Hierarchy

Inherited Members

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

Properties summary

Gets the messaging factory used to create this subscription client.

Gets the message receive mode when processing the received message.

Gets the name of the subscription.

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

Gets the full pathname of the topic.

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 using the specified server 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.

Asynchronously 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 using the specified server wait time.

Adds a new rule to the SubscriptionDescription using the specified rule description.

Adds a rule to the current subscription with the specified name and filter expression.

Asynchronously adds a new rule to the SubscriptionDescription using the specified rule description.

Asynchronously adds a rule to the current subscription with the specified name and filter expression.

Completes processing of a message.

Asynchronously completes processing of a message.

Completes processing of a batch.

Asynchronously completes processing of a batch.

Creates a new copy of SubscriptionClient with specified name and topic path.

Creates a new copy of SubscriptionClient with specified name, topic path and mode.

Creates a new copy of SubscriptionClient from a connection string with specified topic path and name.

Creates a new copy of SubscriptionClient from a connection string with specified topic path, name and mode.

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 deadletter path using the specified topic path and subscription name.

Builds a format name subscription path using the specified topic path and subscription name.

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

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

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

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

Executes the abort action.

Executes upon calling the BeginAcceptMessageSession operation.

Executes upon calling the BeginAddRule operation.

Executes the begin close action.

Executes the begin create receiver action.

Executes the begin create receiver action.

Executes upon calling the BeginGetMessageSessions operation.

Begins removing a RuleDescription from a SubscriptionDescription through the run-time client protocol.

Begins removing a RuleDescription from a SubscriptionDescription through the run-time client protocol using a tag.

Executes the close action.

Executes upon calling the EndAcceptMessageSession operation.

Ends the asynchronous call to OnBeginAddRule(RuleDescription, TimeSpan, AsyncCallback, Object).

Executes the end close action.

Executes the end create receiver action.

Executes the end get message action.

Ends the asynchronous call to OnBeginRemoveRule(String, TimeSpan, AsyncCallback, Object).

Ends the asynchronous call to OnBeginRemoveRule(String, TimeSpan, AsyncCallback, Object).

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.

Returns without removing the first messages in a batch.

Returns without removing the first messages in a batch.

Asynchronously returns without removing the first messages in a batch.

Asynchronously returns without removing the first messages in a batch.

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 batch after the asynchronous operation.

Receives a batch after the asynchronous operation.

Receives a batch after the asynchronous operation.

Asynchronously receives a set of messages (for batch processing).

Asynchronously receives a set of messages (for batch processing).

Asynchronously receives a set of messages (for batch processing).

Registers the handler for the client session.

Registers the handler for the client session.

Asynchronously registers the handler for the client session.

Asynchronously registers the handler for the client session.

Registers the handler factory for the client session.

Registers the handler factory for the client session.

Asynchronously registers the handler factory for the client session.

Asynchronously registers the handler factory for the client session.

Removes the rule described by ruleName.

Asynchronously removes the rule described by ruleName.

Properties

  • MessagingFactory
    MessagingFactory

    Gets the messaging factory used to create this subscription client.

    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

  • Name
    Name

    Gets the name of the subscription.

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

    Property Value

  • PrefetchCount
    PrefetchCount

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

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

    Property Value

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

  • TopicPath
    TopicPath

    Gets the full pathname of the topic.

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

    Property Value

Methods

  • Abandon(Guid)
    Abandon(Guid)

    Discards the message and relinquishes the message lock ownership.

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

    Parameters

    • lockToken

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

    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

    • A task instance that represents the asynchronous abandon operation.

  • 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

    • A task instance that represents the asynchronous abandon operation.

  • 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

  • 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 using the specified server wait time.

    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 specified server wait time.

    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 specified server 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

  • AddRule(RuleDescription)
    AddRule(RuleDescription)

    Adds a new rule to the SubscriptionDescription using the specified rule description.

    public void AddRule(RuleDescription description)Public Sub AddRule(description As RuleDescription)

    Parameters

    Exceptions

  • AddRule(String, Filter)
    AddRule(String, Filter)

    Adds a rule to the current subscription with the specified name and filter expression.

    public void AddRule(string ruleName, Filter filter)Public Sub AddRule(ruleName As String, filter As Filter)

    Parameters

    • ruleName

      The name of the rule to add.

    • filter

      The filter expression against which messages will be matched.

    Exceptions

  • AddRuleAsync(RuleDescription)
    AddRuleAsync(RuleDescription)

    Asynchronously adds a new rule to the SubscriptionDescription using the specified rule description.

    public Task AddRuleAsync(RuleDescription description)Public Function AddRuleAsync(description As RuleDescription) As Task

    Parameters

    Returns

    • A task instance that represents the asynchronous add rule operation.

  • AddRuleAsync(String, Filter)
    AddRuleAsync(String, Filter)

    Asynchronously adds a rule to the current subscription with the specified name and filter expression.

    public Task AddRuleAsync(string ruleName, Filter filter)Public Function AddRuleAsync(ruleName As String, filter As Filter) As Task

    Parameters

    • ruleName

      The name of the rule to add.

    • filter

      The filter expression against which messages will be matched.

    Returns

    • A task instance that represents the asynchronous add rule operation.

  • 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

    • A task instance that represents the asynchronous complete operation.

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

    Completes processing of a 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 batch.

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

    Parameters

    Returns

    • A task instance that represents the asynchronous complete batch operation.

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

    Creates a new copy of SubscriptionClient with specified name and topic path.

    public static SubscriptionClient Create(string topicPath, string name)Public Shared Function Create(topicPath As String, name As String) As SubscriptionClient

    Parameters

    Returns

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

    Creates a new copy of SubscriptionClient with specified name, topic path and mode.

    public static SubscriptionClient Create(string topicPath, string name, ReceiveMode mode)Public Shared Function Create(topicPath As String, name As String, mode As ReceiveMode) As SubscriptionClient

    Parameters

    Returns

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

    Creates a new copy of SubscriptionClient from a connection string with specified topic path and name.

    public static SubscriptionClient CreateFromConnectionString(string connectionString, string topicPath, string name)Public Shared Function CreateFromConnectionString(connectionString As String, topicPath As String, name As String) As SubscriptionClient

    Parameters

    Returns

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

    Creates a new copy of SubscriptionClient from a connection string with specified topic path, name and mode.

    public static SubscriptionClient CreateFromConnectionString(string connectionString, string topicPath, string name, ReceiveMode mode)Public Shared Function CreateFromConnectionString(connectionString As String, topicPath As String, name As String, mode As ReceiveMode) As SubscriptionClient

    Parameters

    Returns

  • DeadLetter(Guid)
    DeadLetter(Guid)

    Moves the undelivered message to the dead letter queue.

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

    Parameters

    • lockToken

      The lock token bound to the locked message instance.

    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

    • A task instance that represents the asynchronous deadletter 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

    Returns

    • A task instance that represents the asynchronous deadletter 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

      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

    • A task instance that represents the asynchronous deadletter operation.

  • 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

    • A task instance that represents the asynchronous defer 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

    Returns

    • A task instance that represents the asynchronous defer operation.

  • FormatDeadLetterPath(String, String)
    FormatDeadLetterPath(String, String)

    Builds a format name deadletter path using the specified topic path and subscription name.

    public static string FormatDeadLetterPath(string topicPath, string subscriptionName)Public Shared Function FormatDeadLetterPath(topicPath As String, subscriptionName As String) As String

    Parameters

    Returns

    • The String resulted from building the format name deadletter path using the specified topic path and subscription name.

  • FormatSubscriptionPath(String, String)
    FormatSubscriptionPath(String, String)

    Builds a format name subscription path using the specified topic path and subscription name.

    public static string FormatSubscriptionPath(string topicPath, string subscriptionName)Public Shared Function FormatSubscriptionPath(topicPath As String, subscriptionName As String) As String

    Parameters

    Returns

    • The String resulted from building the format name subscription path using the specified topic path and subscription name.

  • GetMessageSessions()
    GetMessageSessions()

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

    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 a message session that allows grouping of related messages for processing in a single transaction.

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

    Returns

  • GetMessageSessionsAsync(DateTime)
    GetMessageSessionsAsync(DateTime)

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

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

    Parameters

    Returns

  • OnAbort()
    OnAbort()

    Executes the abort action.

    protected override void OnAbort()Protected Overrides Sub OnAbort
  • OnBeginAcceptMessageSession(String, ReceiveMode, TimeSpan, TimeSpan, AsyncCallback, Object)
    OnBeginAcceptMessageSession(String, ReceiveMode, TimeSpan, TimeSpan, AsyncCallback, Object)

    Executes upon calling the BeginAcceptMessageSession operation.

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

    Parameters

    • sessionId

      The session identifier of the message session.

    • receiveMode

      The receive mode when processing with the receive messages.

    • serverWaitTime

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

    • timeout

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

    • callback

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

    • state

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

    Returns

  • OnBeginAddRule(RuleDescription, TimeSpan, AsyncCallback, Object)
    OnBeginAddRule(RuleDescription, TimeSpan, AsyncCallback, Object)

    Executes upon calling the BeginAddRule operation.

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

    Parameters

    Returns

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

    Executes the begin close action.

    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 wait time before the 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 BeginClose 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.

    • timeout

      The wait time before the 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.SubscriptionClient.EndCreateReceiver(System.IAsyncResult) delegate when the operation is complete.

    Returns

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

    Executes the begin create receiver action.

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

    Parameters

    • subQueuePath

      The path of the subqueue.

    • subQueueName

      The name of the subqueue.

    • receiveMode

      The message ReceiveMode.

    • timeout

      The wait time before the 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.SubscriptionClient.EndCreateReceiver(System.IAsyncResult) delegate when the operation is complete.

    Returns

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

    Executes upon calling the BeginGetMessageSessions operation.

    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

  • OnBeginRemoveRule(String, TimeSpan, AsyncCallback, Object)
    OnBeginRemoveRule(String, TimeSpan, AsyncCallback, Object)

    Begins removing a RuleDescription from a SubscriptionDescription through the run-time client protocol.

    protected abstract IAsyncResult OnBeginRemoveRule(string ruleName, TimeSpan timeout, AsyncCallback callback, object state)Protected MustOverride Function OnBeginRemoveRule(ruleName As String, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    Returns

  • OnBeginRemoveRulesByTag(String, TimeSpan, AsyncCallback, Object)
    OnBeginRemoveRulesByTag(String, TimeSpan, AsyncCallback, Object)

    Begins removing a RuleDescription from a SubscriptionDescription through the run-time client protocol using a tag.

    protected abstract IAsyncResult OnBeginRemoveRulesByTag(string tag, TimeSpan timeout, AsyncCallback callback, object state)Protected MustOverride Function OnBeginRemoveRulesByTag(tag As String, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

    Parameters

    Returns

  • OnClose(TimeSpan)
    OnClose(TimeSpan)

    Executes the close action.

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

    Parameters

  • 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

  • OnEndAddRule(IAsyncResult)
    OnEndAddRule(IAsyncResult)

    Ends the asynchronous call to OnBeginAddRule(RuleDescription, TimeSpan, AsyncCallback, Object).

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

    Parameters

  • 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

    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

  • OnEndRemoveRule(IAsyncResult)
    OnEndRemoveRule(IAsyncResult)

    Ends the asynchronous call to OnBeginRemoveRule(String, TimeSpan, AsyncCallback, Object).

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

    Parameters

  • OnEndRemoveRules(IAsyncResult)
    OnEndRemoveRules(IAsyncResult)

    Ends the asynchronous call to OnBeginRemoveRule(String, TimeSpan, AsyncCallback, Object).

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

    Parameters

  • 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 starting point from which to browse a message.

    Returns

  • PeekBatch(Int32)
    PeekBatch(Int32)

    Returns without removing the first messages in a batch.

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

    Parameters

    • messageCount

      The number of messages in a batch.

    Returns

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

    Returns without removing the first messages in a batch.

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

    • messageCount

      The number of messages in a batch.

    Returns

  • PeekBatchAsync(Int32)
    PeekBatchAsync(Int32)

    Asynchronously returns without removing the first messages in a batch.

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

    Parameters

    • messageCount

      The number of messages in a batch.

    Returns

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

    Asynchronously returns without removing the first messages in a batch.

    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 starting point from which to browse a message.

    • messageCount

      The number of messages in a batch.

    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 batch after the asynchronous operation.

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

    Parameters

    Returns

  • ReceiveBatch(Int32)
    ReceiveBatch(Int32)

    Receives a batch after the asynchronous operation.

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

    Parameters

    • messageCount

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

    Returns

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

    Receives a batch after the asynchronous operation.

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

    Parameters

    • messageCount

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

    • serverWaitTime

      The time span the server waits for processing messages.

    Returns

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

    Asynchronously receives a set of messages (for batch processing).

    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 set of messages (for batch processing).

    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 set of messages (for batch processing).

    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 the server waits for processing messages.

    Returns

  • RegisterSessionHandler(Type)
    RegisterSessionHandler(Type)

    Registers the handler for the client session.

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

    Parameters

    • handlerType

      The type of the handler.

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

    Registers the handler for the client session.

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

    Parameters

  • RegisterSessionHandlerAsync(Type)
    RegisterSessionHandlerAsync(Type)

    Asynchronously registers the handler for the client session.

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

    Parameters

    • handlerType

      The type of the handler.

    Returns

    • The task object representing the asynchronous operation.

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

    Asynchronously registers the handler for the client session.

    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 the handler factory for the client session.

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

    Parameters

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

    Registers the handler factory for the client session.

    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 the handler factory for the client session.

    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 the handler factory for the client session.

    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.

  • RemoveRule(String)
    RemoveRule(String)

    Removes the rule described by ruleName.

    public void RemoveRule(string ruleName)Public Sub RemoveRule(ruleName As String)

    Parameters

    Exceptions

  • RemoveRuleAsync(String)
    RemoveRuleAsync(String)

    Asynchronously removes the rule described by ruleName.

    public Task RemoveRuleAsync(string ruleName)Public Function RemoveRuleAsync(ruleName As String) As Task

    Parameters

    Returns

    • A task instance that represents the asynchronous remove rule 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

Details

Assembly

Microsoft.ServiceBus.dll