Share via


NamespaceManager.GetSubscriptionsAsync Method

Definition

Overloads

GetSubscriptionsAsync(String, String)

Asynchronously retrieves an enumerable collection of all subscriptions in the service namespace.

GetSubscriptionsAsync(String)

Asynchronously retrieves an enumerable collection of all subscriptions in the service namespace.

GetSubscriptionsAsync(String, String)

Asynchronously retrieves an enumerable collection of all subscriptions in the service namespace.

public System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.SubscriptionDescription>> GetSubscriptionsAsync (string topicPath, string filter);
member this.GetSubscriptionsAsync : string * string -> System.Threading.Tasks.Task<seq<Microsoft.ServiceBus.Messaging.SubscriptionDescription>>
Public Function GetSubscriptionsAsync (topicPath As String, filter As String) As Task(Of IEnumerable(Of SubscriptionDescription))

Parameters

topicPath
String

The path of the topic relative to the service namespace base address.

filter
String

The string used to filter the subscriptions to be retrieved.

Returns

The asynchronous operation.

Examples

var subscriptionsWithMessages = await namespaceManager.GetSubscriptionsAsync("topicName", "messageCount Gt 0");
var subscriptionsStartsWith = await namespaceManager.GetSubscriptionsAsync("topicName", $"startswith(path, 'subscription') eq true");

Remarks

Filter expression formats: {Propery} {Logical Operator} {Value} AND {Filter expression} {Function} {Logical Operator} {Value} AND {Filter expression} ----------------------------------------------------------------------------------------- Available properties: ModifiedAt | AccessedAt | CreatedAt | MessageCount Logical operators: Eq | Ne | Gt | Ge | Lt | Le Value: A value of the corresponding property type Functions: startswith({Propery}, {Value})

Applies to

GetSubscriptionsAsync(String)

Asynchronously retrieves an enumerable collection of all subscriptions in the service namespace.

public System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.SubscriptionDescription>> GetSubscriptionsAsync (string topicPath);
member this.GetSubscriptionsAsync : string -> System.Threading.Tasks.Task<seq<Microsoft.ServiceBus.Messaging.SubscriptionDescription>>
Public Function GetSubscriptionsAsync (topicPath As String) As Task(Of IEnumerable(Of SubscriptionDescription))

Parameters

topicPath
String

The path of the topic relative to the service namespace base address.

Returns

The asynchronous operation.

Applies to