SubscriptionClient Class
Represents the anchor class used in run-time operations related to a topic subscription.
System::Object
Microsoft.ServiceBus.Messaging::MessageClientEntity
Microsoft.ServiceBus.Messaging::SubscriptionClient
Microsoft.ServiceBus.Messaging::MessageClientEntity
Microsoft.ServiceBus.Messaging::SubscriptionClient
Namespace: Microsoft.ServiceBus.Messaging
Assembly: Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)
The SubscriptionClient type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | IsClosed | Gets or sets a value that indicates whether the message client entity is closed. (Inherited from MessageClientEntity.) |
![]() | MessagingFactory | Gets the messaging factory used to create this subscription client. |
![]() | Mode | Gets the message receive mode when processing the received message. |
![]() | Name | Gets the name of the subscription. |
![]() | PrefetchCount | Gets or sets the number of messages that the message receiver can simultaneously request. |
![]() | ThisLock | Gents an object used for locking the MessageClientEntity instance. (Inherited from MessageClientEntity.) |
![]() | TopicPath | Gets the full pathname of the topic. |
| Name | Description | |
|---|---|---|
![]() | Abandon(Guid) | Discards the message and relinquishes the message lock ownership. |
![]() | Abandon(Guid, IDictionary<String, Object>) | Discards the message and relinquishes the message lock ownership. |
![]() | AbandonAsync(Guid) | Asynchronously discards the message and relinquishes the message lock ownership. |
![]() | AbandonAsync(Guid, IDictionary<String, Object>) | Asynchronously discards the message and relinquishes the message lock ownership. |
![]() | Abort | Aborts the message client entity and puts its status into a closing state. (Inherited from MessageClientEntity.) |
![]() | AcceptMessageSession() | Accepts a message session that allows grouping of related messages for processing in a single transaction. |
![]() | AcceptMessageSession(String) | Accepts a message session that allows grouping of related messages for processing in a single transaction using the given session identifier. |
![]() | AcceptMessageSession(TimeSpan) | Accepts a message session that allows grouping of related messages for processing in a single transaction using the specified server wait time. |
![]() | 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. |
![]() | AcceptMessageSessionAsync() | Asynchronously accepts a message session that allows grouping of related messages for processing in a single transaction using the specified server wait time. |
![]() | 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. |
![]() | 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. |
![]() | 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. |
![]() | AddRule(RuleDescription) | Adds a new rule to the Subscription using the specified rule description. |
![]() | AddRule(String, Filter) | Adds a rule to the current subscription with the specified name and filter expression. |
![]() | AddRuleAsync(RuleDescription) | Asynchronously adds a new rule to the Subscription using the specified rule description. |
![]() | AddRuleAsync(String, Filter) | Asynchronously adds a rule to the current subscription with the specified name and filter expression. |
![]() | BeginAbandon(Guid, AsyncCallback, Object) | Begins an asynchronous operation to abandon the message and relinquish its lock. |
![]() | BeginAbandon(Guid, IDictionary<String, Object>, AsyncCallback, Object) | Begins an asynchronous operation to abandon the message and relinquish its lock. |
![]() | BeginAcceptMessageSession(AsyncCallback, Object) | Begins an asynchronous operation to accept a message session. |
![]() | BeginAcceptMessageSession(String, AsyncCallback, Object) | Begins an asynchronous operation to accept a message session. |
![]() | BeginAcceptMessageSession(TimeSpan, AsyncCallback, Object) | Begins an asynchronous operation to accept a message session. |
![]() | BeginAcceptMessageSession(String, TimeSpan, AsyncCallback, Object) | Begins an asynchronous operation to accept a message session. |
![]() | BeginAddRule(RuleDescription, AsyncCallback, Object) | Begins an asynchronous operation to add a new rule to the subscription. |
![]() | BeginAddRule(String, Filter, AsyncCallback, Object) | Begins an asynchronous operation to add a new rule to the subscription. |
![]() | BeginClose | Begins an asynchronous operation to close the message client entity. (Inherited from MessageClientEntity.) |
![]() | BeginComplete | Begins an asynchronous operation to complete processing of a message. |
![]() | BeginCompleteBatch | Begins an asynchronous operation to complete processing of a message. |
![]() | BeginDeadLetter(Guid, AsyncCallback, Object) | Begins an asynchronous operation to move a message to the dead letter queue. |
![]() | BeginDeadLetter(Guid, IDictionary<String, Object>, AsyncCallback, Object) | Begins an asynchronous operation to move a message to the dead letter queue. |
![]() | BeginDeadLetter(Guid, String, String, AsyncCallback, Object) | Begins an asynchronous operation to move a message to the dead letter queue. |
![]() | BeginDefer(Guid, AsyncCallback, Object) | Begins an asynchronous operation to suspend processing of a message. |
![]() | BeginDefer(Guid, IDictionary<String, Object>, AsyncCallback, Object) | Begins an asynchronous operation to suspend processing of a message. |
![]() | BeginGetMessageSessions(AsyncCallback, Object) | Begins an asynchronous operation to get a message session. |
![]() | BeginGetMessageSessions(DateTime, AsyncCallback, Object) | Begins an asynchronous operation to get a message session. |
![]() | BeginPeek(AsyncCallback, Object) | Begins an asynchronous operation to return without removing the first message in the queue. |
![]() | BeginPeek(Int64, AsyncCallback, Object) | Begins an asynchronous operation to return without removing the first message in the queue. |
![]() | BeginPeekBatch(Int32, AsyncCallback, Object) | Begins an asynchronous operation to peek a batch. |
![]() | BeginPeekBatch(Int64, Int32, AsyncCallback, Object) | Begins an asynchronous operation to peek a batch. |
![]() | BeginReceive(AsyncCallback, Object) | Begins an asynchronous operation to receive a message. |
![]() | BeginReceive(Int64, AsyncCallback, Object) | Begins an asynchronous operation to receive a message. |
![]() | BeginReceive(TimeSpan, AsyncCallback, Object) | Begins an asynchronous operation to receive a message. |
![]() | BeginReceiveBatch(IEnumerable<Int64>, AsyncCallback, Object) | Begins an asynchronous operation to receive a batch. |
![]() | BeginReceiveBatch(Int32, AsyncCallback, Object) | Begins an asynchronous operation to receive a batch. |
![]() | BeginReceiveBatch(Int32, TimeSpan, AsyncCallback, Object) | Begins an asynchronous operation to receive a batch. |
![]() | BeginRemoveRule | Begins an asynchronous remove rule action. |
![]() | Close | Closes the message client entity and puts its status into a closed state. (Inherited from MessageClientEntity.) |
![]() | CloseAsync | Asynchronously closes the message client entity and puts its status into a closed state. (Inherited from MessageClientEntity.) |
![]() | Complete | Completes processing of a message. |
![]() | CompleteAsync | Asynchronously completes processing of a message. |
![]() | CompleteBatch | Completes processing of a batch. |
![]() | CompleteBatchAsync | Asynchronously completes processing of a batch. |
![]() ![]() | Create(String, String) | Creates a new copy of SubscriptionClient with specified name and topic path. |
![]() ![]() | Create(String, String, ReceiveMode) | Creates a new copy of SubscriptionClient with specified name, topic path and mode. |
![]() ![]() | CreateFromConnectionString(String, String, String) | Creates a new copy of SubscriptionClient from a connection string with specified topic path and name. |
![]() ![]() | CreateFromConnectionString(String, String, String, ReceiveMode) | Creates a new copy of SubscriptionClient from a connection string with specified topic path, name and mode. |
![]() | DeadLetter(Guid) | Moves the undelivered message to the dead letter queue. |
![]() | DeadLetter(Guid, IDictionary<String, Object>) | Moves the undelivered message to the dead letter queue. |
![]() | DeadLetter(Guid, String, String) | Moves the undelivered message to the dead letter queue. |
![]() | DeadLetterAsync(Guid) | Asynchronously moves the undelivered message to the dead letter queue. |
![]() | DeadLetterAsync(Guid, IDictionary<String, Object>) | Asynchronously moves the undelivered message to the dead letter queue. |
![]() | DeadLetterAsync(Guid, String, String) | Asynchronously moves the undelivered message to the dead letter queue. |
![]() | Defer(Guid) | Suspends the processing of a message. |
![]() | Defer(Guid, IDictionary<String, Object>) | Suspends the processing of a message. |
![]() | DeferAsync(Guid) | Asynchronously suspends the processing of a message. |
![]() | DeferAsync(Guid, IDictionary<String, Object>) | Asynchronously suspends the processing of a message. |
![]() | EndAbandon | Finishes an asynchronous operation to abandon the message and relinquish its lock. |
![]() | EndAcceptMessageSession | Finishes an asynchronous operation to accept a message session that allows grouping of related messages for processing in a single transaction. |
![]() | EndAddRule | Ends an asynchronous add rule operation. |
![]() | EndClose | Finishes an asynchronous operation to close the message client entity. (Inherited from MessageClientEntity.) |
![]() | EndComplete | Finishes an asynchronous operation to complete processing of a message. |
![]() | EndCompleteBatch | Finishes an asynchronous operation to complete processing of a batch. |
![]() | EndDeadLetter | Finishes an asynchronous operation to move message to the dead letter queue. |
![]() | EndDefer | Finishes an asynchronous operation to suspend processing of a message. |
![]() | EndGetMessageSessions | Finishes an asynchronous operation to get the processing of a message. |
![]() | EndPeek | Finishes an asynchronous peek operation. |
![]() | EndPeekBatch | Finishes an asynchronous peek operation on a batch of messages. |
![]() | EndReceive | Finishes an asynchronous operation to receive a message. |
![]() | EndReceiveBatch | Finishes an asynchronous operation to receive a batch. |
![]() | EndRemoveRule | Ends an asynchronous remove rule operation. |
![]() | Equals | (Inherited from Object.) |
![]() | Fault | Puts the message client entity into a faulted state. (Inherited from MessageClientEntity.) |
![]() | Finalize | (Inherited from Object.) |
![]() ![]() | FormatDeadLetterPath | Builds a format name deadletter path using the specified topic path and subscription name. |
![]() ![]() | FormatSubscriptionPath | Builds a format name subscription path using the specified topic path and subscription name. |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetMessageSessions() | Gets a message session that allows grouping of related messages for processing in a single transaction. |
![]() | GetMessageSessions(DateTime) | Retrieves all message sessions whose session state was updated since lastUpdatedTime. |
![]() | GetMessageSessionsAsync() | Asynchronously gets a message session that allows grouping of related messages for processing in a single transaction. |
![]() | GetMessageSessionsAsync(DateTime) | Asynchronously gets a message session that allows grouping of related messages for processing in a single transaction. |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | OnAbort | Executes the abort action. (Overrides MessageClientEntity::OnAbort().) |
![]() | OnBeginAcceptMessageSession | Executes upon calling the BeginAcceptMessageSession operation. |
![]() | OnBeginAddRule | Executes upon calling the BeginAddRule operation. |
![]() | OnBeginClose | Executes the begin close action. (Overrides MessageClientEntity::OnBeginClose(TimeSpan, AsyncCallback, Object).) |
![]() | OnBeginCreateReceiver(ReceiveMode, TimeSpan, AsyncCallback, Object) | Executes the begin create receiver action. |
![]() | OnBeginCreateReceiver(String, String, ReceiveMode, TimeSpan, AsyncCallback, Object) | Executes the begin create receiver action. |
![]() | OnBeginGetMessageSessions | Executes upon calling the BeginGetMessageSessions operation. |
![]() | OnBeginOpen | Executes upon calling the operation to begin to open the message client entity. (Inherited from MessageClientEntity.) |
![]() | OnBeginRemoveRule | Begins removing a Rule from a Subscription through the run-time client protocol. |
![]() | OnBeginRemoveRulesByTag | Begins removing a Rule from a Subscription through the run-time client protocol using a tag. |
![]() | OnClose | Executes the close action. (Overrides MessageClientEntity::OnClose(TimeSpan).) |
![]() | OnClosed | Occurs when the message client entity is transitioned into a closing state. (Inherited from MessageClientEntity.) |
![]() | OnEndAcceptMessageSession | Executes upon calling the EndAcceptMessageSession operation. |
![]() | OnEndAddRule | Ends the asynchronous call to OnBeginAddRule. |
![]() | OnEndClose | Executes the end close action. (Overrides MessageClientEntity::OnEndClose(IAsyncResult).) |
![]() | OnEndCreateReceiver | Executes the end create receiver action. |
![]() | OnEndGetMessageSessions | Executes the end get message action. |
![]() | OnEndOpen | Executes upon calling the operation to end to open the message client entity. (Inherited from MessageClientEntity.) |
![]() | OnEndRemoveRule | Ends the asynchronous call to OnBeginRemoveRule(String, TimeSpan, AsyncCallback, Object). |
![]() | OnEndRemoveRules | Ends the asynchronous call to OnBeginRemoveRule(String, TimeSpan, AsyncCallback, Object). |
![]() | OnFaulted | Executes upon calling the Fault operation. (Inherited from MessageClientEntity.) |
![]() | OnMessage(Action<BrokeredMessage>) | Processes a message in an event-driven message pump. |
![]() | OnMessage(Action<BrokeredMessage>, OnMessageOptions) | Processes a message in an event-driven message pump, with the given set of OnMessageOptions options. |
![]() | OnMessageAsync(Func<BrokeredMessage, Task>) | Asynchronously processes a message. |
![]() | OnMessageAsync(Func<BrokeredMessage, Task>, OnMessageOptions) | Asynchronously processes a message. |
![]() | OnOpen | Executes upon calling the operation to open the message client entity. (Inherited from MessageClientEntity.) |
![]() | OnOpened | Executes when the message client entity is opened. (Inherited from MessageClientEntity.) |
![]() | Peek() | Returns without removing the first message in the queue. |
![]() | Peek(Int64) | Returns without removing the first message in the queue. |
![]() | PeekAsync() | Asynchronously returns without removing the first message in the queue. |
![]() | PeekAsync(Int64) | Asynchronously returns without removing the first message in the queue. |
![]() | PeekBatch(Int32) | Returns without removing the first messages in a batch. |
![]() | PeekBatch(Int64, Int32) | Returns without removing the first messages in a batch. |
![]() | PeekBatchAsync(Int32) | Asynchronously returns without removing the first messages in a batch. |
![]() | PeekBatchAsync(Int64, Int32) | Asynchronously returns without removing the first messages in a batch. |
![]() | Receive() | Receives a message using the InternalReceiver(). |
![]() | Receive(Int64) | Receives a message using the InternalReceiver(). |
![]() | Receive(TimeSpan) | Receives a message using the InternalReceiver(). |
![]() | ReceiveAsync() | Asynchronously receives a message using the InternalReceiver(). |
![]() | ReceiveAsync(Int64) | Asynchronously receives a message using the InternalReceiver(). |
![]() | ReceiveAsync(TimeSpan) | Asynchronously receives a message using the InternalReceiver(). |
![]() | ReceiveBatch(IEnumerable<Int64>) | Receives a batch after the asynchronous operation. |
![]() | ReceiveBatch(Int32) | Receives a batch after the asynchronous operation. |
![]() | ReceiveBatch(Int32, TimeSpan) | Receives a batch after the asynchronous operation. |
![]() | ReceiveBatchAsync(IEnumerable<Int64>) | Asynchronously receives a set of messages (for batch processing). |
![]() | ReceiveBatchAsync(Int32) | Asynchronously receives a set of messages (for batch processing). |
![]() | ReceiveBatchAsync(Int32, TimeSpan) | Asynchronously receives a set of messages (for batch processing). |
![]() | RemoveRule | Removes the rule described by ruleName. |
![]() | RemoveRuleAsync | Asynchronously removes the rule described by ruleName. |
![]() | ThrowIfClosed | Throws an exception if the message client entity is closed. (Inherited from MessageClientEntity.) |
![]() | ThrowIfDisposed | Throws an exception if the message client entity is disposed. (Inherited from MessageClientEntity.) |
![]() | ThrowIfDisposedOrImmutable | Throws an exception if the client is disposed or immutable. (Inherited from MessageClientEntity.) |
![]() | ThrowIfDisposedOrNotOpen | Throws an exception if the client is disposed or not open. (Inherited from MessageClientEntity.) |
![]() | ThrowIfFaulted | Throws an exception if the client is faulted. (Inherited from MessageClientEntity.) |
![]() | ToString | (Inherited from Object.) |
// Create subscription client SubscriptionClient mySubscriptionClient = factory.CreateSubscriptionClient(topicName, subscriptionName); // Create a receiver MessageReceiver myMessageReceiver = mySubscriptionClient.CreateReceiver(ReceiveMode.PeekLock); // Receive messages for (int count = 0; count < MsgCount; count++) { var message = subscriptionClient.Receive(); message.Complete(); }
