Table of Contents

Class NamespaceManager

Namespace
Microsoft.ServiceBus
Assembly
Microsoft.ServiceBus.dll

Represents an anchor class used in managing entities, such as queues, topics, subscriptions, and rules, in your service namespace. You must provide service namespace address and access credentials in order to manage your service namespace.

public sealed class NamespaceManager
Inheritance
NamespaceManager
Inherited Members

Examples

NamespaceManagerSettings nsSettings = new NamespaceManagerSettings(); // with credentials and operation timeout
NamespaceManager manager = new NamespaceManager(new Uri("baseUri"), nsSettings);

Constructors

NamespaceManager(IEnumerable<string>)

Initializes a new instance of the NamespaceManager class with the given addresses.

public NamespaceManager(IEnumerable<string> addresses)

Parameters

addresses IEnumerable<string>

The full addresses of the service namespace.

NamespaceManager(IEnumerable<string>, NamespaceManagerSettings)

Initializes a new instance of the NamespaceManager class with the given addresses and settings.

public NamespaceManager(IEnumerable<string> addresses, NamespaceManagerSettings settings)

Parameters

addresses IEnumerable<string>

The full addresses of the service namespace.

settings NamespaceManagerSettings

A NamespaceManagerSettings object, which contains the TokenProvider and OperationTimeout properties.

Remarks

Even though it is not allowed to include paths in the namespace address, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base addresses, i.e. it is not a must that the credentials you specify be to the base adresses itself.

NamespaceManager(IEnumerable<string>, TokenProvider)

Initializes a new instance of the NamespaceManager class with the given addresses and token provider.

public NamespaceManager(IEnumerable<string> addresses, TokenProvider tokenProvider)

Parameters

addresses IEnumerable<string>

The full addresses of the service namespace.

tokenProvider TokenProvider

The security token provider.

Remarks

Even though it is not allowed to include paths in the namespace addresses, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base addresses.

NamespaceManager(IEnumerable<Uri>)

Initializes a new instance of the NamespaceManager class with the given service namespace URI base addresses.

public NamespaceManager(IEnumerable<Uri> addresses)

Parameters

addresses IEnumerable<Uri>

The full URI addresses of the service namespace.

NamespaceManager(IEnumerable<Uri>, NamespaceManagerSettings)

Initializes a new instance of the NamespaceManager class with the given service namespace URI base addresses and settings.

public NamespaceManager(IEnumerable<Uri> addresses, NamespaceManagerSettings settings)

Parameters

addresses IEnumerable<Uri>

The full URI addresses of the service namespace.

settings NamespaceManagerSettings

A NamespaceManagerSettings object, which contains the TokenProvider and OperationTimeout properties.

Remarks

Even though it is not allowed to include paths in the namespace addresses, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base addresses, i.e. it is not a must that the credentials you specify be to the base adresses itself.

NamespaceManager(IEnumerable<Uri>, TokenProvider)

Initializes a new instance of the NamespaceManager class with the given service namespace URI base addresses and token provider.

public NamespaceManager(IEnumerable<Uri> addresses, TokenProvider tokenProvider)

Parameters

addresses IEnumerable<Uri>

The full URI addresses of the service namespace.

tokenProvider TokenProvider

The security token provider.

Remarks

Even though it is not allowed to include paths in the namespace addresses, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base addresses, i.e. it is not a must that the credentials you specify be to the base adresses itself.

NamespaceManager(string)

Initializes a new instance of the NamespaceManager class with the given service namespace address.

public NamespaceManager(string address)

Parameters

address string

The full address of the service namespace.

NamespaceManager(string, NamespaceManagerSettings)

Initializes a new instance of the NamespaceManager class with the given service namespace base address and NamespaceManagerSettings object.

public NamespaceManager(string address, NamespaceManagerSettings settings)

Parameters

address string

The full address of the service namespace.

settings NamespaceManagerSettings

A NamespaceManagerSettings object, which contains the TokenProvider and OperationTimeout properties.

Remarks

Even though it is not allowed to include paths in the namespace address, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base address, i.e. it is not a must that the credentials you specify be to the base adress itself.

Exceptions

ArgumentException

address contains a path appended to the full address of the service namespace.

ArgumentNullException

address or settings is null.

NamespaceManager(string, TokenProvider)

Initializes a new instance of the NamespaceManager class with the given service namespace base address and token provider.

public NamespaceManager(string address, TokenProvider tokenProvider)

Parameters

address string

The full address of the service namespace.

tokenProvider TokenProvider

The security token provider.

Remarks

Even though it is not allowed to include paths in the namespace address, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base address.

Exceptions

ArgumentException

address contains a path appended to the full address of the service namespace.

ArgumentNullException

address or tokenProvider is null.

NamespaceManager(Uri)

Initializes a new instance of the NamespaceManager class with the given service namespace URI base address.

public NamespaceManager(Uri address)

Parameters

address Uri

The full URI address of the service namespace.

NamespaceManager(Uri, NamespaceManagerSettings)

Initializes a new instance of the NamespaceManager class with the given service namespace URI base address and NamespaceManagerSettings object.

public NamespaceManager(Uri address, NamespaceManagerSettings settings)

Parameters

address Uri

The full URI address of the service namespace.

settings NamespaceManagerSettings

A NamespaceManagerSettings object, which contains the TokenProvider and OperationTimeout properties.

Remarks

Even though it is not allowed to include paths in the namespace address, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base address, i.e. it is not a must that the credentials you specify be to the base adress itself.

Exceptions

ArgumentException

address contains a path appended to the full address of the service namespace.

ArgumentNullException

address or settings is null.

NamespaceManager(Uri, TokenProvider)

Initializes a new instance of the NamespaceManager class with the given service namespace URI base address and TokenProvider object.

public NamespaceManager(Uri address, TokenProvider tokenProvider)

Parameters

address Uri

The full URI address of the service namespace.

tokenProvider TokenProvider

The security token provider object.

Remarks

Even though it is not allowed to include paths in the namespace address, you can specify a credential that authorizes you to perform actions only on some sublevels off of the base address, i.e. it is not a must that the credentials you specify be to the base adress itself.

Exceptions

ArgumentException

address contains a path appended to the full address of the service namespace.

ArgumentNullException

address or tokenProvider is null.

Fields

ProtocolVersion

Specifies the string of the format "YYYY-MM" that indicates the client protocol version.

public const string ProtocolVersion = "2017-04"

Field Value

string

Properties

Address

Gets the service namespace base address.

public Uri Address { get; }

Property Value

Uri

A System.Uri that represents the service namespace base address.

Settings

Gets the service namespace client settings.

public NamespaceManagerSettings Settings { get; }

Property Value

NamespaceManagerSettings

A NamespaceManagerSettings object that represents the service namespace client settings.

Methods

Create()

Creates a new instance of NamespaceManager.

public static NamespaceManager Create()

Returns

NamespaceManager

A new instance of NamespaceManager.

CreateConsumerGroup(ConsumerGroupDescription)

Creates an Event Hubs consumer group using the specified ConsumerGroupDescription.

public ConsumerGroupDescription CreateConsumerGroup(ConsumerGroupDescription description)

Parameters

description ConsumerGroupDescription

The ConsumerGroupDescription.

Returns

ConsumerGroupDescription

Returns ConsumerGroupDescription.

CreateConsumerGroup(string, string)

Creates an Event Hubs consumer group using default values, with the specified Event Hubs path and a name for the consumer group.

public ConsumerGroupDescription CreateConsumerGroup(string eventHubPath, string name)

Parameters

eventHubPath string

The path to the Event Hub.

name string

The name of the consumer group.

Returns

ConsumerGroupDescription

Returns ConsumerGroupDescription.

CreateConsumerGroupAsync(ConsumerGroupDescription)

public Task<ConsumerGroupDescription> CreateConsumerGroupAsync(ConsumerGroupDescription description)

Parameters

description ConsumerGroupDescription

The ConsumerGroupDescription.

Returns

Task<ConsumerGroupDescription>

The task that completes the asynchronous operation.

CreateConsumerGroupAsync(string, string)

Asynchronous version of CreateConsumerGroup(string, string).

public Task<ConsumerGroupDescription> CreateConsumerGroupAsync(string eventHubPath, string name)

Parameters

eventHubPath string

The path to the Event Hub.

name string

The name of the consumer group.

Returns

Task<ConsumerGroupDescription>

The task that completes the asynchronous operation.

CreateConsumerGroupIfNotExists(ConsumerGroupDescription)

Creates a consumer group if it does not already exist, using the specified ConsumerGroupDescription as metadata. If the group already exists, then return the stored ConsumerGroupDescription.

public ConsumerGroupDescription CreateConsumerGroupIfNotExists(ConsumerGroupDescription description)

Parameters

description ConsumerGroupDescription

A ConsumerGroupDescription object.

Returns

ConsumerGroupDescription

Returns the newly-created ConsumerGroupDescription. If the consumer group already exists, returns the existing ConsumerGroupDescription.

CreateConsumerGroupIfNotExists(string, string)

Creates a consumer group if it does not already exist, using the specified Event Hubs path and group name. If the group already exists, then return the stored ConsumerGroupDescription.

public ConsumerGroupDescription CreateConsumerGroupIfNotExists(string eventHubPath, string name)

Parameters

eventHubPath string

Path to the Event Hub.

name string

The name of the consumer group to create.

Returns

ConsumerGroupDescription

Returns the newly-created ConsumerGroupDescription. If the consumer group already exists, returns the existing ConsumerGroupDescription.

CreateConsumerGroupIfNotExistsAsync(ConsumerGroupDescription)

public Task<ConsumerGroupDescription> CreateConsumerGroupIfNotExistsAsync(ConsumerGroupDescription description)

Parameters

description ConsumerGroupDescription

The consumer group description.

Returns

Task<ConsumerGroupDescription>

The task that completes the asynchronous operation.

CreateConsumerGroupIfNotExistsAsync(string, string)

public Task<ConsumerGroupDescription> CreateConsumerGroupIfNotExistsAsync(string eventHubPath, string name)

Parameters

eventHubPath string

The path to the Event Hub.

name string

The name of the consumer group.

Returns

Task<ConsumerGroupDescription>

The task that completes the asynchronous operation.

CreateEventHub(EventHubDescription)

Creates a new Event Hub using the specified EventHubDescription.

public EventHubDescription CreateEventHub(EventHubDescription description)

Parameters

description EventHubDescription

The EventHubDescription.

Returns

EventHubDescription

Returns the EventHubDescription.

CreateEventHub(string)

Creates a new Event Hub using default values, for the given input path.

public EventHubDescription CreateEventHub(string path)

Parameters

path string

The path to the Event Hub.

Returns

EventHubDescription

Returns the EventHubDescription.

CreateEventHubAsync(EventHubDescription)

Asynchronously creates an event hub.

public Task<EventHubDescription> CreateEventHubAsync(EventHubDescription description)

Parameters

description EventHubDescription

An EventHubDescription object that describes the Event Hub to create.

Returns

Task<EventHubDescription>

The task that completes the asynchronous operation.

CreateEventHubAsync(string)

Asynchronously creates an event hub.

public Task<EventHubDescription> CreateEventHubAsync(string path)

Parameters

path string

The path to the Event Hub.

Returns

Task<EventHubDescription>

The task that completes the asynchronous operation.

CreateEventHubIfNotExists(EventHubDescription)

Creates an Event Hub if it does not exist.

public EventHubDescription CreateEventHubIfNotExists(EventHubDescription description)

Parameters

description EventHubDescription

An EventHubDescription object that describes the Event Hub to create.

Returns

EventHubDescription

Returns anEventHubDescription object.

CreateEventHubIfNotExists(string)

Creates an Event Hub if it does not exist.

public EventHubDescription CreateEventHubIfNotExists(string path)

Parameters

path string

The path to the Event Hub.

Returns

EventHubDescription

Returns an EventHubDescription object.

CreateEventHubIfNotExistsAsync(EventHubDescription)

Asynchronously creates an Event Hub if it does not exist.

public Task<EventHubDescription> CreateEventHubIfNotExistsAsync(EventHubDescription description)

Parameters

description EventHubDescription

The event hub description.

Returns

Task<EventHubDescription>

The task that completes the asynchronous operation.

CreateEventHubIfNotExistsAsync(string)

Asynchronously creates an Event Hub if it does not exist.

public Task<EventHubDescription> CreateEventHubIfNotExistsAsync(string path)

Parameters

path string

The path of the event hub.

Returns

Task<EventHubDescription>

The task that completes the asynchronous operation.

CreateFromConnectionString(string)

Creates a new instance of NamespaceManager using a specified connection string.

public static NamespaceManager CreateFromConnectionString(string connectionString)

Parameters

connectionString string

The connection sting used.

Returns

NamespaceManager

A new instance of NamespaceManager.

CreateQueue(QueueDescription)

Creates a new queue in the service namespace with the specified queue description.

public QueueDescription CreateQueue(QueueDescription description)

Parameters

description QueueDescription

A QueueDescription object describing the attributes with which the new queue will be created.

Returns

QueueDescription

The QueueDescription of the newly created queue.

CreateQueue(string)

Creates a new queue in the service namespace with the given path.

public QueueDescription CreateQueue(string path)

Parameters

path string

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

Returns

QueueDescription

The QueueDescription of the newly created queue.

Exceptions

ArgumentException

path is null or empty.

ArgumentOutOfRangeException

The length of path is greater than 290 characters.

TimeoutException

The operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

MessagingEntityAlreadyExistsException

A queue or a topic with the same name and path exists under the same service namespace.

UnauthorizedAccessException

The NamespaceManager object does not have sufficient permission to perform this operation. You should check to ensure that your NamespaceManager has the correct TokenProvider credentials to perform this operation.

QuotaExceededException

Either the specified size in the description is not supported or the maximum allowable quota has been reached. You must specify one of the supported size values, delete existing entities, or increase your quota size.

MessagingException

An internal error or unexpected exception occurs.

ServerBusyException

The server is overloaded with logical operations. You can consider any of the following actions:Wait and retry calling this function.Remove entities before retry (for example, receive messages before sending any more).

CreateQueueAsync(QueueDescription)

Asynchronously creates a new queue in the service namespace with the specified queue description.

public Task<QueueDescription> CreateQueueAsync(QueueDescription description)

Parameters

description QueueDescription

A QueueDescription object describing the attributes with which the new queue will be created.

Returns

Task<QueueDescription>

The QueueDescription of the newly created queue.

CreateQueueAsync(string)

Asynchronously creates a new queue in the service namespace with the given path.

public Task<QueueDescription> CreateQueueAsync(string path)

Parameters

path string

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

Returns

Task<QueueDescription>

The QueueDescription of the newly created queue.

CreateRelay(RelayDescription)

Creates a new relay in the service namespace with the specified relay description.

public RelayDescription CreateRelay(RelayDescription description)

Parameters

description RelayDescription

The description object describing the attributes with which the new relay will be created.

Returns

RelayDescription

The RelayDescription object for the newly created relay.

CreateRelay(string, RelayType)

Creates a new relay in the service namespace with the given path and type.

public RelayDescription CreateRelay(string path, RelayType type)

Parameters

path string

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

type RelayType

The relay type.

Returns

RelayDescription

The RelayDescription object for the newly created relay.

CreateRelayAsync(RelayDescription)

Asynchronously creates a new relay in the service namespace with the specified relay description.

public Task<RelayDescription> CreateRelayAsync(RelayDescription description)

Parameters

description RelayDescription

The description object describing the attributes with which the new relay will be created.

Returns

Task<RelayDescription>

The RelayDescription object for the newly created relay.

CreateRelayAsync(string, RelayType)

Asynchronously creates a new relay in the service namespace with the given path and type.

public Task<RelayDescription> CreateRelayAsync(string path, RelayType type)

Parameters

path string

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

type RelayType

The relay type.

Returns

Task<RelayDescription>

The RelayDescription object for the newly created relay.

CreateSubscription(SubscriptionDescription)

Creates a new subscription in the service namespace with the specified subscription description.

public SubscriptionDescription CreateSubscription(SubscriptionDescription description)

Parameters

description SubscriptionDescription

A SubscriptionDescription object describing the attributes with which the new subscription will be created.

Returns

SubscriptionDescription

The SubscriptionDescription of the newly created subscription.

Remarks

Be default, A "pass-through" filter is created for this subscription, which means it will allow all message to go to this subscription. The name of the filter is DefaultRuleName.

CreateSubscription(SubscriptionDescription, Filter)

Creates a new subscription in the service namespace with the specified subscription description and filter expression.

public SubscriptionDescription CreateSubscription(SubscriptionDescription description, Filter filter)

Parameters

description SubscriptionDescription

A SubscriptionDescription object describing the attributes with which the new subscription will be created.

filter Filter

The filter expression used to capture messages satisfying the filtering expression value.

Returns

SubscriptionDescription

The SubscriptionDescription of the newly created subscription.

Remarks

A default rule will be created using data from filter and named as DefaultRuleName.

CreateSubscription(SubscriptionDescription, RuleDescription)

Creates a new subscription in the service namespace with the specified subscription description and rule description.

public SubscriptionDescription CreateSubscription(SubscriptionDescription description, RuleDescription ruleDescription)

Parameters

description SubscriptionDescription

A SubscriptionDescription object describing the attributes with which the new subscription will be created.

ruleDescription RuleDescription

A RuleDescription object describing the attributes with which the messages are matched and acted upon.

Returns

SubscriptionDescription

The SubscriptionDescription of the newly created subscription.

Remarks

A default rule will be created using data from ruleDescription. If Name is null or white space, then the name of the rule created will be DefaultRuleName.

CreateSubscription(string, string)

Creates a new subscription in the service namespace with the specified topic path and subscription name.

public SubscriptionDescription CreateSubscription(string topicPath, string name)

Parameters

topicPath string

The topic path relative to the service namespace base address.

name string

The name of the subscription.

Returns

SubscriptionDescription

The SubscriptionDescription of the newly created subscription.

Remarks

Be default, A "pass-through" filter is created for this subscription, which means it will allow all message to go to this subscription. The name of the filter is DefaultRuleName.

CreateSubscription(string, string, Filter)

Creates a new subscription in the service namespace with the specified topic path, subscription name, and filter expression.

public SubscriptionDescription CreateSubscription(string topicPath, string name, Filter filter)

Parameters

topicPath string

The topic path relative to the service namespace base address.

name string

The name of the subscription.

filter Filter

The filter expression used to capture messages satisfying the filtering expression value.

Returns

SubscriptionDescription

The SubscriptionDescription of the newly created subscription.

Remarks

A default rule will be created using data from filter and named as DefaultRuleName.

CreateSubscription(string, string, RuleDescription)

Creates a new subscription in the service namespace with the specified topic path, subscription name, and rule description.

public SubscriptionDescription CreateSubscription(string topicPath, string name, RuleDescription ruleDescription)

Parameters

topicPath string

The topic path relative to the service namespace base address.

name string

The name of the subscription.

ruleDescription RuleDescription

A RuleDescription object describing the attributes with which the messages are matched and acted upon.

Returns

SubscriptionDescription

The SubscriptionDescription of the newly created subscription.

Remarks

A default rule will be created using data from ruleDescription. If Name is null or white space, then the name of the rule created will be DefaultRuleName.

CreateSubscriptionAsync(SubscriptionDescription)

Asynchronously creates a new subscription in the service namespace with the specified subscription description.

public Task<SubscriptionDescription> CreateSubscriptionAsync(SubscriptionDescription description)

Parameters

description SubscriptionDescription

A SubscriptionDescription object describing the attributes with which the new subscription will be created.

Returns

Task<SubscriptionDescription>

The asynchronously created subscription.

CreateSubscriptionAsync(SubscriptionDescription, Filter)

Asynchronously creates a new subscription in the service namespace with the specified subscription description and filter expression.

public Task<SubscriptionDescription> CreateSubscriptionAsync(SubscriptionDescription description, Filter filter)

Parameters

description SubscriptionDescription

A SubscriptionDescription object describing the attributes with which the new subscription will be created.

filter Filter

The filter expression used to capture messages satisfying the filtering expression value.

Returns

Task<SubscriptionDescription>

The asynchronously created subscription.

CreateSubscriptionAsync(SubscriptionDescription, RuleDescription)

Asynchronously creates a new subscription in the service namespace with the specified subscription description and rule description.

public Task<SubscriptionDescription> CreateSubscriptionAsync(SubscriptionDescription description, RuleDescription ruleDescription)

Parameters

description SubscriptionDescription

A SubscriptionDescription object describing the attributes with which the new subscription will be created.

ruleDescription RuleDescription

A RuleDescription object describing the attributes with which the messages are matched and acted upon.

Returns

Task<SubscriptionDescription>

The asynchronously created subscription.

CreateSubscriptionAsync(string, string)

Asynchronously creates a new subscription in the service namespace with the specified topic path and subscription name.

public Task<SubscriptionDescription> CreateSubscriptionAsync(string topicPath, string name)

Parameters

topicPath string

The topic path relative to the service namespace base address.

name string

The name of the subscription.

Returns

Task<SubscriptionDescription>

The asynchronously created subscription.

CreateSubscriptionAsync(string, string, Filter)

Asynchronously creates a new subscription in the service namespace with the specified topic path, subscription name, and filter expression.

public Task<SubscriptionDescription> CreateSubscriptionAsync(string topicPath, string name, Filter filter)

Parameters

topicPath string

The topic path relative to the service namespace base address.

name string

The name of the subscription.

filter Filter

The filter expression used to capture messages satisfying the filtering expression value.

Returns

Task<SubscriptionDescription>

The asynchronously created subscription.

CreateSubscriptionAsync(string, string, RuleDescription)

Asynchronously creates a new subscription in the service namespace with the specified topic path, subscription name, and rule description.

public Task<SubscriptionDescription> CreateSubscriptionAsync(string topicPath, string name, RuleDescription ruleDescription)

Parameters

topicPath string

The topic path relative to the service namespace base address.

name string

The name of the subscription.

ruleDescription RuleDescription

A RuleDescription object describing the attributes with which the messages are matched and acted upon.

Returns

Task<SubscriptionDescription>

The asynchronously created subscription.

CreateTopic(TopicDescription)

Creates a new topic inside the service namespace with the specified topic description.

public TopicDescription CreateTopic(TopicDescription description)

Parameters

description TopicDescription

A TopicDescription object describing the attributes with which the new topic will be created.

Returns

TopicDescription

The TopicDescription of the newly created topic.

CreateTopic(string)

Creates a new topic inside the service namespace with the given service namespace path.

public TopicDescription CreateTopic(string path)

Parameters

path string

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

Returns

TopicDescription

The TopicDescription of the newly created topic.

Exceptions

ArgumentException

path is null or empty, or path begins or ends with “/”.

ArgumentOutOfRangeException

Length of path is greater than QueueNameMaximumLength.

TimeoutException

The operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

MessagingEntityAlreadyExistsException

A queue or a topic with the same name and path exists under the same service namespace.

UnauthorizedAccessException

The NamespaceManager object does not have sufficient permission to perform this operation. You should check to ensure that your NamespaceManager has the correct TokenProvider credentials to perform this operation.

QuotaExceededException

Either the specified size in the description is not supported or the maximum allowable quota has been reached. You must specify one of the supported size values, delete existing entities, or increase your quota size.

MessagingException

An internal error or unexpected exception occurs.

CreateTopicAsync(TopicDescription)

Asynchronously creates a new topic inside the service namespace with the specified topic description.

public Task<TopicDescription> CreateTopicAsync(TopicDescription description)

Parameters

description TopicDescription

A TopicDescription object describing the attributes with which the new topic will be created.

Returns

Task<TopicDescription>

The asynchronous operation.

CreateTopicAsync(string)

Asynchronously creates a new topic inside the service namespace with the given service namespace path.

public Task<TopicDescription> CreateTopicAsync(string path)

Parameters

path string

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

Returns

Task<TopicDescription>

The asynchronous operation.

DeleteConsumerGroup(string, string)

Deletes a consumer group.

public void DeleteConsumerGroup(string eventHubPath, string name)

Parameters

eventHubPath string

The path to the Event Hub.

name string

The name of the consumer group to delete.

DeleteConsumerGroupAsync(string, string)

Asynchronously deletes a consumer group.

public Task DeleteConsumerGroupAsync(string eventHubPath, string name)

Parameters

eventHubPath string

The path to the Event Hub.

name string

The name of the consumer group to delete.

Returns

Task

The task that represents the asynchronous operation.

DeleteEventHub(string)

Deletes an Event Hub.

public void DeleteEventHub(string path)

Parameters

path string

The path to the Event Hub.

DeleteEventHubAsync(string)

Asynchronously deletes an Event Hub.

public Task DeleteEventHubAsync(string path)

Parameters

path string

The path to the Event Hub.

Returns

Task

The task that represents the asynchronous operation.

DeleteQueue(string)

Deletes the queue described by the path relative to the service namespace base address.

public void DeleteQueue(string path)

Parameters

path string

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

Exceptions

ArgumentException

path is empty or null, or path starts or ends with "/".

ArgumentOutOfRangeException

The length of path is greater than QueueNameMaximumLength.

TimeoutException

The operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

MessagingEntityNotFoundException

Queue does not exist under this path.

UnauthorizedAccessException

The NamespaceManager object does not have sufficient permission to perform this operation. You should check to ensure that your NamespaceManager has the correct TokenProvider credentials to perform this operation.

MessagingException

An internal error or unexpected exception occurs.

DeleteQueueAsync(string)

Asynchronously deletes the queue described by the path relative to the service namespace base address.

public Task DeleteQueueAsync(string path)

Parameters

path string

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

Returns

Task

The asynchronous delete queue operation.

DeleteRelay(string)

Deletes the relay described by the path relative to the service namespace base address.

public void DeleteRelay(string path)

Parameters

path string

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

DeleteRelayAsync(string)

Asynchronously deletes the relay described by the path relative to the service namespace base address.

public Task DeleteRelayAsync(string path)

Parameters

path string

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

Returns

Task

The asynchronous delete relay operation.

DeleteSubscription(string, string)

Deletes the subscription with the specified topic path and subscription name.

public void DeleteSubscription(string topicPath, string name)

Parameters

topicPath string

The topic path relative to the service namespace base address.

name string

The name of the subscription to delete.

DeleteSubscriptionAsync(string, string)

Asynchronously deletes the subscription with the specified topic path and subscription name.

public Task DeleteSubscriptionAsync(string topicPath, string name)

Parameters

topicPath string

The topic path relative to the service namespace base address.

name string

The name of the subscription to delete.

Returns

Task

The asynchronous delete subscription operation.

DeleteTopic(string)

Deletes the topic described by path relative to the service namespace base address.

public void DeleteTopic(string path)

Parameters

path string

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

Exceptions

ArgumentException

path is null or empty, or path starts or ends with "/".

DeleteTopicAsync(string)

Asynchronously deletes the topic described by path relative to the service namespace base address.

public Task DeleteTopicAsync(string path)

Parameters

path string

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

Returns

Task

The asynchronous deleted topic operation.

EventHubExists(string)

Indicates whether or not an Event Hub exists.

public bool EventHubExists(string path)

Parameters

path string

The path to the Event Hub.

Returns

bool

Returns true if the Event Hub exists; otherwise, false.

EventHubExistsAsync(string)

Asynchronously determines whether the event hub exists from the service namespace.

public Task<bool> EventHubExistsAsync(string path)

Parameters

path string

The path of the event hub.

Returns

Task<bool>

The task representing the asynchronous operation.

GetConsumerGroup(string, string)

Gets an Event Hubs consumer group.

public ConsumerGroupDescription GetConsumerGroup(string eventHubPath, string name)

Parameters

eventHubPath string

The path to the Event Hub.

name string

The name of the consumer group.

Returns

ConsumerGroupDescription

Returns ConsumerGroupDescription.

GetConsumerGroupAsync(string, string)

Asynchronously gets a consumer group.

public Task<ConsumerGroupDescription> GetConsumerGroupAsync(string eventHubPath, string name)

Parameters

eventHubPath string

The path to the Event Hub.

name string

The name of the consumer group.

Returns

Task<ConsumerGroupDescription>

The task representing the asynchronous operation.

GetConsumerGroups(string)

Gets a collection representing a set of consumer groups.

public IEnumerable<ConsumerGroupDescription> GetConsumerGroups(string eventHubPath)

Parameters

eventHubPath string

The path to the Event Hub.

Returns

IEnumerable<ConsumerGroupDescription>

Returns an IEnumerable<T> object representing the set of consumer groups.

GetConsumerGroupsAsync(string)

Asynchronously gets a set of consumer groups.

public Task<IEnumerable<ConsumerGroupDescription>> GetConsumerGroupsAsync(string eventHubPath)

Parameters

eventHubPath string

The path to the Event Hub.

Returns

Task<IEnumerable<ConsumerGroupDescription>>

The task representing the asynchronous operation.

GetEventHub(string)

Gets information about an Event Hub.

public EventHubDescription GetEventHub(string path)

Parameters

path string

The path to the Event Hub.

Returns

EventHubDescription

Returns an EventHubDescription object that contains the Event Hub description.

GetEventHubAsync(string)

Asynchronously gets information about an Event Hub.

public Task<EventHubDescription> GetEventHubAsync(string path)

Parameters

path string

The path to the Event Hub.

Returns

Task<EventHubDescription>

The task representing the asynchronous operation.

GetEventHubPartition(string, string)

Returns information about the specified Event Hub partition. This method assumes that you want partition information for the partition specified by the name parameter that belongs to the default consumer group pointed to by eventHubPath.

public PartitionDescription GetEventHubPartition(string eventHubPath, string name)

Parameters

eventHubPath string

The path to the Event Hub.

name string

The ID of the Event Hub partition.

Returns

PartitionDescription

Returns PartitionDescription.

GetEventHubPartition(string, string, string)

public PartitionDescription GetEventHubPartition(string eventHubPath, string consumerGroupName, string name)

Parameters

eventHubPath string
consumerGroupName string
name string

Returns

PartitionDescription

GetEventHubPartitionAsync(string, string)

Asynchronous version of GetEventHubPartition(string, string).

public Task<PartitionDescription> GetEventHubPartitionAsync(string eventHubPath, string name)

Parameters

eventHubPath string

The path to the Event Hub.

name string

The ID of the Event Hub partition.

Returns

Task<PartitionDescription>

Returns Task<TResult>.

GetEventHubPartitionAsync(string, string, string)

Asynchronous version of GetEventHubPartition(string, string).

public Task<PartitionDescription> GetEventHubPartitionAsync(string eventHubPath, string consumerGroupName, string name)

Parameters

eventHubPath string

The path to the Event Hub.

consumerGroupName string

The name of the Event Hubs consumer group.

name string

The ID of the Event Hubs partition.

Returns

Task<PartitionDescription>

Returns Task<TResult>.

GetEventHubs()

Gets a collection representing a set of Event Hubs.

public IEnumerable<EventHubDescription> GetEventHubs()

Returns

IEnumerable<EventHubDescription>

Returns an IEnumerable<T> object representing the set of Event Hubs.

GetEventHubsAsync()

Asynchronously gets a list of Event Hubs.

public Task<IEnumerable<EventHubDescription>> GetEventHubsAsync()

Returns

Task<IEnumerable<EventHubDescription>>

The task representing the asynchronous operation.

GetQueue(string)

Retrieves a queue from the service namespace.

public QueueDescription GetQueue(string path)

Parameters

path string

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

Returns

QueueDescription

A QueueDescription handle to the queue, or a MessagingEntityNotFoundException exception if the queue does not exist in the service namespace.

Exceptions

ArgumentException

path is empty or null, or path starts or ends with "/".

TimeoutException

The operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

UnauthorizedAccessException

The NamespaceManager object does not have sufficient permission to perform this operation. You should check to ensure that your NamespaceManager has the correct TokenProvider credentials to perform this operation.

MessagingEntityNotFoundException

The queue does not exist in the service namespace.

MessagingException

An internal error or unexpected exception occurs.

GetQueueAsync(string)

Asynchronously retrieves a queue from the service namespace.

public Task<QueueDescription> GetQueueAsync(string path)

Parameters

path string

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

Returns

Task<QueueDescription>

The asynchronous operation.

GetQueues()

Retrieves an enumerable collection of all queues in the service namespace.

public IEnumerable<QueueDescription> GetQueues()

Returns

IEnumerable<QueueDescription>

An IEnumerable<T> object that represents the collection of all queues in the service namespace or returns an empty collection if no queue exists.

Exceptions

TimeoutException

The operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

UnauthorizedAccessException

The NamespaceManager object does not have sufficient permission to perform this operation. You should check to ensure that your NamespaceManager has the correct TokenProvider credentials to perform this operation.

MessagingException

An internal error or unexpected exception occurs.

GetQueues(string)

Retrieves an enumerable collection of all queues in the service namespace with the specified filter. You can filter by a combination of entity name (including starts with), entity length (Gt or Lt), created, updated, and accessed time (Gt or Lt).

public IEnumerable<QueueDescription> GetQueues(string filter)

Parameters

filter string

A string used to filter the queues to be retrieved.

Returns

IEnumerable<QueueDescription>

An IEnumerable<T> object that represents the collection of all queues in the service namespace or returns an empty collection if no queue exists.

Examples

var queuesWithMessages = namespaceManager.GetQueues("messageCount Gt 0");
var queuesStartsWith = namespaceManager.GetQueues($"startswith(path, 'queue') eq true");

Remarks

Filter expression formats: {Propery} {Logical Operator} {Value} AND {Filter expression} {Function} {Logical Operator} {Value} AND {Filter expression}

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

GetQueuesAsync()

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

public Task<IEnumerable<QueueDescription>> GetQueuesAsync()

Returns

Task<IEnumerable<QueueDescription>>

The asynchronous operation.

GetQueuesAsync(string)

Asynchronously retrieves an enumerable collection of all queues in the service namespace with specified filter.

public Task<IEnumerable<QueueDescription>> GetQueuesAsync(string filter)

Parameters

filter string

The string used to filter the queues to be retrieved.

Returns

Task<IEnumerable<QueueDescription>>

The asynchronous operation.

Examples

var queuesWithMessages = await namespaceManager.GetQueuesAsync("messageCount Gt 0");
var queuesStartsWith = await namespaceManager.GetQueuesAsync($"startswith(path, 'queue') eq true");

Remarks

Filter expression formats: {Propery} {Logical Operator} {Value} AND {Filter expression} {Function} {Logical Operator} {Value} AND {Filter expression}

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

GetRelay(string)

Retrieves the details of a given relay endpoint.

public RelayDescription GetRelay(string path)

Parameters

path string

The relay path.

Returns

RelayDescription

GetRelayAsync(string)

Asynchronously retrieves the details of a given relay endpoint.

public Task<RelayDescription> GetRelayAsync(string path)

Parameters

path string

The relay path.

Returns

Task<RelayDescription>

The asynchronous operation.

GetRelays()

Retrieves a collection of all relays in the service namespace.

public IEnumerable<RelayDescription> GetRelays()

Returns

IEnumerable<RelayDescription>

GetRelaysAsync()

Asynchronously retrieves a collection of all relays in the service namespace.

public Task<IEnumerable<RelayDescription>> GetRelaysAsync()

Returns

Task<IEnumerable<RelayDescription>>

The asynchronous operation.

GetRevokedPublishers(string)

Returns all revoked publishers in an Event Hub.

public IEnumerable<RevokedPublisherDescription> GetRevokedPublishers(string entityPath)

Parameters

entityPath string

Path to the Event Hub. See Path.

Returns

IEnumerable<RevokedPublisherDescription>

Returns an IEnumerable<T> collection containing the revoked publishers.

GetRevokedPublishersAsync(string)

Asynchronous version of GetRevokedPublishers(string).

public Task<IEnumerable<RevokedPublisherDescription>> GetRevokedPublishersAsync(string entityPath)

Parameters

entityPath string

Path to the Event Hub. See Path.

Returns

Task<IEnumerable<RevokedPublisherDescription>>

Returns a Task<TResult> containing the revoked publishers.

GetRules(string, string)

Retrieves an enumerable collection of all rules in the service namespace.

public IEnumerable<RuleDescription> GetRules(string topicPath, string subscriptionName)

Parameters

topicPath string

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

subscriptionName string

The name of the subscription.

Returns

IEnumerable<RuleDescription>

An IEnumerable<T> object that represents the collection of all rules in the service namespace or returns an empty collection if no rule exists.

GetRules(string, string, string)

Retrieves an enumerable collection of all rules in the service namespace with specified topic path, subscription name and filter.

public IEnumerable<RuleDescription> GetRules(string topicPath, string subscriptionName, string filter)

Parameters

topicPath string

The topic path relative to the service namespace base address.

subscriptionName string

The name of the subscription.

filter string

The string used to filter the rules to be retrieved.

Returns

IEnumerable<RuleDescription>

An IEnumerable<T> object that represents the collection of all rules in the service namespace or returns an empty collection if no rule exists.

Examples

var fiveMinutesAgo = DateTime.UtcNow.AddMinutes(-5).ToString("M/dd/yyyy hh:mm:ss");
var rulesInTheLast5Minutes = namespaceManager.GetRules(topicName, subscriptionName, $"createdAt gt '{fiveMinutesAgo}'");

Remarks

Filter expression format: {Propery} {Logical Operator} {Value} {Filter expression}

Available properties: ModifiedAt | AccessedAt | CreatedAt Logical operators: Eq | Ne | Gt | Ge | Lt | Le
Value: A value of the corresponding property type

GetRulesAsync(string, string)

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

public Task<IEnumerable<RuleDescription>> GetRulesAsync(string topicPath, string subscriptionName)

Parameters

topicPath string

The topic path relative to the service namespace base address.

subscriptionName string

The name of the subscription.

Returns

Task<IEnumerable<RuleDescription>>

The asynchronous operation.

GetRulesAsync(string, string, string)

Asynchronously retrieves an enumerable collection of all rules in the service namespace with specified topic path, subscription name and filter.

public Task<IEnumerable<RuleDescription>> GetRulesAsync(string topicPath, string subscriptionName, string filter)

Parameters

topicPath string

The topic path relative to the service namespace base address.

subscriptionName string

The name of the subscription.

filter string

The string used to filter the rules to be retrieved.

Returns

Task<IEnumerable<RuleDescription>>

The asynchronous operation.

Examples

var fiveMinutesAgo = DateTime.UtcNow.AddMinutes(-5).ToString("M/dd/yyyy hh:mm:ss");
var rulesInTheLast5Minutes = await namespaceManager.GetRulesAsync(topicName, subscriptionName, $"createdAt gt '{fiveMinutesAgo}'");

Remarks

Filter expression format: {Propery} {Logical Operator} {Value} {Filter expression}

Available properties: ModifiedAt | AccessedAt | CreatedAt Logical operators: Eq | Ne | Gt | Ge | Lt | Le
Value: A value of the corresponding property type

GetSubscription(string, string)

Retrieves the topic from the service namespace.

public SubscriptionDescription GetSubscription(string topicPath, string name)

Parameters

topicPath string

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

name string

The name of the subscription.

Returns

SubscriptionDescription

A SubscriptionDescription handle to the subscription, or a MessagingEntityNotFoundException exception if the subscription does not exist in the service namespace.

Exceptions

MessagingEntityNotFoundException

The subscription does not exist in the service namespace.

GetSubscriptionAsync(string, string)

Asynchronously retrieves the topic from the service namespace.

public Task<SubscriptionDescription> GetSubscriptionAsync(string topicPath, string name)

Parameters

topicPath string

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

name string

The name of the subscription.

Returns

Task<SubscriptionDescription>

The asynchronous operation.

GetSubscriptions(string)

Retrieves an enumerable collection of all subscriptions in the service namespace.

public IEnumerable<SubscriptionDescription> GetSubscriptions(string topicPath)

Parameters

topicPath string

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

Returns

IEnumerable<SubscriptionDescription>

An IEnumerable<T> object that represents the collection of all subscriptions in the service namespace or returns an empty collection if no subscription exists.

GetSubscriptions(string, string)

Retrieves an enumerable collection of all subscriptions in the service namespace with specified topic path and filter.

public IEnumerable<SubscriptionDescription> GetSubscriptions(string topicPath, string filter)

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

IEnumerable<SubscriptionDescription>

An IEnumerable<T> object that represents the collection of all subscriptions in the service namespace or returns an empty collection if no subscription exists.

Examples

var subscriptionsWithMessages = namespaceManager.GetSubscriptions("topicName", "messageCount Gt 0");
var subscriptionsStartsWith = namespaceManager.GetSubscriptions("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})

GetSubscriptionsAsync(string)

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

public Task<IEnumerable<SubscriptionDescription>> GetSubscriptionsAsync(string topicPath)

Parameters

topicPath string

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

Returns

Task<IEnumerable<SubscriptionDescription>>

The asynchronous operation.

GetSubscriptionsAsync(string, string)

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

public Task<IEnumerable<SubscriptionDescription>> GetSubscriptionsAsync(string topicPath, string filter)

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

Task<IEnumerable<SubscriptionDescription>>

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

GetTopic(string)

Retrieves the topic from the service namespace.

public TopicDescription GetTopic(string path)

Parameters

path string

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

Returns

TopicDescription

A TopicDescription reference to the topic, or a MessagingEntityNotFoundException exception if the topic does not exist in the service namespace.

Exceptions

ArgumentException

path is empty or null.

TimeoutException

The operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

UnauthorizedAccessException

The NamespaceManager object does not have sufficient permission to perform this operation. You should check to ensure that your NamespaceManager has the correct TokenProvider credentials to perform this operation.

MessagingEntityNotFoundException

The topic does not exist in the service namespace.

MessagingException

An internal error or unexpected exception occurs.

GetTopicAsync(string)

Asynchronously retrieves the topic from the service namespace.

public Task<TopicDescription> GetTopicAsync(string path)

Parameters

path string

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

Returns

Task<TopicDescription>

The asynchronous operation.

GetTopics()

Retrieves a collection of topics in a service namespace.

public IEnumerable<TopicDescription> GetTopics()

Returns

IEnumerable<TopicDescription>

An IEnumerable<T> object that represents the collection of topics under the current namespace, or returns an empty collection if no topic exists.

Exceptions

TimeoutException

The operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

UnauthorizedAccessException

The NamespaceManager object does not have sufficient permission to perform this operation. You should check to ensure that your NamespaceManager has the correct TokenProvider credentials to perform this operation.

MessagingException

An internal error or unexpected exception occurs.

GetTopics(string)

Retrieves a collection of topics in a service namespace with the specified filter. You can filter by a combination of entity name (including starts with), entity length (Gt or Lt), created, updated, and accessed time (Gt or Lt).

public IEnumerable<TopicDescription> GetTopics(string filter)

Parameters

filter string

The string used to filter the topics to be retrieved.

Returns

IEnumerable<TopicDescription>

An IEnumerable<T> object that represents the collection of topics under the current namespace, or returns an empty collection if no topic exists.

Examples

var topicsWithMessages = namespaceManager.GetTopics("messageCount Gt 0");
var topicsStartsWith = namespaceManager.GetTopics($"startswith(path, 'topic') eq true");

Remarks

Filter expression formats: {Propery} {Logical Operator} {Value} AND {Filter expression} {Function} {Logical Operator} {Value} AND {Filter expression}

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

GetTopicsAsync()

Asynchronously retrieves a collection of topics in a service namespace.

public Task<IEnumerable<TopicDescription>> GetTopicsAsync()

Returns

Task<IEnumerable<TopicDescription>>

The asynchronous operation.

GetTopicsAsync(string)

Asynchronously retrieves a collection of topics in a service namespace.

public Task<IEnumerable<TopicDescription>> GetTopicsAsync(string filter)

Parameters

filter string

The string used to filter the topics to be retrieved.

Returns

Task<IEnumerable<TopicDescription>>

The asynchronous operation.

Examples

var topicsWithMessages = await namespaceManager.GetTopicsAsync("messageCount Gt 0");
var topicsStartsWith = await namespaceManager.GetTopicsAsync($"startswith(path, 'topic') eq true");

Remarks

Filter expression formats: {Propery} {Logical Operator} {Value} AND {Filter expression} {Function} {Logical Operator} {Value} AND {Filter expression}

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

GetVersionInfo()

Retrieves a string of the format "YYYY-MM" that indicates the maximum supported protocol version that the server or service can handle.

public string GetVersionInfo()

Returns

string

A string that indicates the maximum supported protocol version that the server or service can handle.

GetVersionInfoAsync()

Asynchronously retrieves a string of the format "YYYY-MM" that indicates the maximum supported protocol version that the server or service can handle.

public Task<string> GetVersionInfoAsync()

Returns

Task<string>

The asynchronous operation.

QueueExists(string)

Determines whether a queue exists in the service namespace.

public bool QueueExists(string path)

Parameters

path string

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

Returns

bool

true if a queue exists in the service namespace; otherwise, false.

QueueExistsAsync(string)

Asynchronously determines whether a queue exists in the service namespace.

public Task<bool> QueueExistsAsync(string path)

Parameters

path string

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

Returns

Task<bool>

The asynchronous operation.

RelayExists(string)

Determines whether a relay exists in the service namespace.

public bool RelayExists(string path)

Parameters

path string

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

Returns

bool

RelayExistsAsync(string)

Asynchronously determines whether a relay exists in the service namespace.

public Task<bool> RelayExistsAsync(string path)

Parameters

path string

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

Returns

Task<bool>

The asynchronous operation.

RenameQueue(string, string)

Renames a queue inside a namespace.

public QueueDescription RenameQueue(string path, string newPath)

Parameters

path string

The path to an existing queue.

newPath string

The new path to the renamed queue.

Returns

QueueDescription

Returns QueueDescription.

Exceptions

ArgumentException

Thrown when path is null or empty.

ArgumentOutOfRangeException

Thrown when the length of path is more than 290 characters.

TimeoutException

Thrown when the operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You can increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

MessagingEntityNotFoundException

Thrown when the source queue with the specified path does not exist.

MessagingEntityAlreadyExistsException

Thrown when the target queue with the same path exists within the same namespace.

UnauthorizedAccessException

Thrown when the client does not have credentials to perform the operation.

MessagingException

Thrown when an internal error or unexpected exception occurs.

RenameQueueAsync(string, string)

Asynchronous version of RenameQueue(string, string).

public Task<QueueDescription> RenameQueueAsync(string path, string newPath)

Parameters

path string

The path to an existing queue.

newPath string

The new path to the renamed queue.

Returns

Task<QueueDescription>

Returns Task<TResult>.

Exceptions

ArgumentException

Thrown when path is null or empty.

ArgumentOutOfRangeException

Thrown when the length of path is more than 290 characters.

TimeoutException

Thrown when the operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You can increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

MessagingEntityNotFoundException

Thrown when the source queue with the specified path does not exist.

MessagingEntityAlreadyExistsException

Thrown when the target queue with the same path exists within the same namespace.

UnauthorizedAccessException

Thrown when the client does not have credentials to perform the operation.

MessagingException

Thrown when an internal error or unexpected exception occurs.

RenameTopic(string, string)

Renames a topic inside a namespace.

public TopicDescription RenameTopic(string path, string newPath)

Parameters

path string

The path to an existing topic.

newPath string

The new path to the renamed topic.

Returns

TopicDescription

Returns TopicDescription.

Exceptions

ArgumentException

Thrown when path is null or empty.

ArgumentOutOfRangeException

Thrown when the length of path is more than 290 characters.

TimeoutException

Thrown when the operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You can increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

MessagingEntityNotFoundException

Thrown when the source topic with the specified path does not exist.

MessagingEntityAlreadyExistsException

Thrown when the target topic with the same path exists within the same namespace.

UnauthorizedAccessException

Thrown when the client does not have credentials to perform the operation.

MessagingException

Thrown when an internal error or unexpected exception occurs.

RenameTopicAsync(string, string)

Asynchronous version of RenameTopic(string, string).

public Task<TopicDescription> RenameTopicAsync(string path, string newPath)

Parameters

path string

The path to an existing topic.

newPath string

The new path to the renamed topic.

Returns

Task<TopicDescription>

Returns Task<TResult>.

Exceptions

ArgumentException

Thrown when path is null or empty.

ArgumentOutOfRangeException

Thrown when the length of path is more than 290 characters.

TimeoutException

Thrown when the operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You can increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

MessagingEntityNotFoundException

Thrown when the source topic with the specified path does not exist.

MessagingEntityAlreadyExistsException

Thrown when the target topic with the same path exists within the same namespace.

UnauthorizedAccessException

Thrown when the client does not have credentials to perform the operation.

MessagingException

Thrown when an internal error or unexpected exception occurs.

RestorePublisher(string, string)

Removes the publisher from the Event Hubs revocation list.

public void RestorePublisher(string entityPath, string publisher)

Parameters

entityPath string

Event Hub path under which the publisher was revoked and must be restored. See EventHubDescription.

publisher string

The revoked publisher.

RestorePublisherAsync(string, string)

Asynchronous version of RestorePublisher(string, string).

public Task RestorePublisherAsync(string entityPath, string publisher)

Parameters

entityPath string

Event Hub path under which the publisher was revoked and must be restored. See EventHubDescription.

publisher string

The revoked publisher.

Returns

Task

Returns Task.

RevokePublisher(string, string)

Adds the publisher to the Event Hubs revocation list.

public RevokedPublisherDescription RevokePublisher(string entityPath, string publisher)

Parameters

entityPath string

Event Hub path under which the publisher must be revoked. See EventHubDescription.

publisher string

The publisher to revoke.

Returns

RevokedPublisherDescription

Returns RevokedPublisherDescription.

RevokePublisherAsync(string, string)

Asynchronous version of RevokePublisher(string, string).

public Task<RevokedPublisherDescription> RevokePublisherAsync(string entityPath, string publisher)

Parameters

entityPath string

Event Hub path under which the publisher must be revoked. See EventHubDescription.

publisher string

The publisher to revoke.

Returns

Task<RevokedPublisherDescription>

Returns Task<TResult>.

SubscriptionExists(string, string)

Determines whether a subscription exists in the service namespace.

public bool SubscriptionExists(string topicPath, string name)

Parameters

topicPath string

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

name string

The name of the subscription.

Returns

bool

true if a subscription exists in the service namespace; otherwise, false.

SubscriptionExistsAsync(string, string)

Asynchronously determines whether a subscription exists in the service namespace.

public Task<bool> SubscriptionExistsAsync(string topicPath, string name)

Parameters

topicPath string

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

name string

The name of the subscription.

Returns

Task<bool>

The asynchronous operation.

TopicExists(string)

Determines whether a topic exists in the service namespace.

public bool TopicExists(string path)

Parameters

path string

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

Returns

bool

true if a topic exists in the service namespace; otherwise, false.

TopicExistsAsync(string)

Asynchronously determines whether a topic exists in the service namespace.

public Task<bool> TopicExistsAsync(string path)

Parameters

path string

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

Returns

Task<bool>

The asynchronous operation.

UpdateConsumerGroup(ConsumerGroupDescription)

Updates an Event Hubs consumer group.

public ConsumerGroupDescription UpdateConsumerGroup(ConsumerGroupDescription description)

Parameters

description ConsumerGroupDescription

A ConsumerGroupDescription object containing the updated information.

Returns

ConsumerGroupDescription

Returns ConsumerGroupDescription.

UpdateConsumerGroupAsync(ConsumerGroupDescription)

Asynchronously updates the consumer group.

public Task<ConsumerGroupDescription> UpdateConsumerGroupAsync(ConsumerGroupDescription description)

Parameters

description ConsumerGroupDescription

The consumer group description.

Returns

Task<ConsumerGroupDescription>

The task representing the asynchronous operation.

UpdateEventHub(EventHubDescription)

Updates an Event Hub.

public EventHubDescription UpdateEventHub(EventHubDescription description)

Parameters

description EventHubDescription

An EventHubDescription object containing the updated information.

Returns

EventHubDescription

Returns EventHubDescription.

UpdateEventHubAsync(EventHubDescription)

Asynchronously updates the event hub.

public Task<EventHubDescription> UpdateEventHubAsync(EventHubDescription description)

Parameters

description EventHubDescription

The event hub description.

Returns

Task<EventHubDescription>

The task representing the asynchronous operation.

UpdateQueue(QueueDescription)

Enables you to update the queue.

public QueueDescription UpdateQueue(QueueDescription description)

Parameters

description QueueDescription

A QueueDescription object describing the queue to be updated.

Returns

QueueDescription

The QueueDescription of the updated queue.

UpdateQueueAsync(QueueDescription)

Asynchronously enables you to update the queue.

public Task<QueueDescription> UpdateQueueAsync(QueueDescription description)

Parameters

description QueueDescription

A QueueDescription object describing the queue to be updated.

Returns

Task<QueueDescription>

The asynchronous operation.

UpdateRelay(RelayDescription)

Upddates a relay endpoint.

public RelayDescription UpdateRelay(RelayDescription description)

Parameters

description RelayDescription

A RelayDescription object describing the updated relay.

Returns

RelayDescription

UpdateRelayAsync(RelayDescription)

Asynchronously upddates a relay endpoint.

public Task<RelayDescription> UpdateRelayAsync(RelayDescription description)

Parameters

description RelayDescription

A RelayDescription object describing the updated relay.

Returns

Task<RelayDescription>

The asynchronous operation.

UpdateSubscription(SubscriptionDescription)

Enables you to update the subscription.

public SubscriptionDescription UpdateSubscription(SubscriptionDescription description)

Parameters

description SubscriptionDescription

A SubscriptionDescription object describing the subscription to be updated.

Returns

SubscriptionDescription

The SubscriptionDescription of the updated subscription.

UpdateSubscriptionAsync(SubscriptionDescription)

Asynchronously enables you to update the subscription.

public Task<SubscriptionDescription> UpdateSubscriptionAsync(SubscriptionDescription description)

Parameters

description SubscriptionDescription

A SubscriptionDescription object describing the subscription to be updated.

Returns

Task<SubscriptionDescription>

The asynchronous operation.

UpdateTopic(TopicDescription)

Enables you to update the topic.

public TopicDescription UpdateTopic(TopicDescription description)

Parameters

description TopicDescription

A TopicDescription object describing the topic to be updated.

Returns

TopicDescription

The TopicDescription of the updated topic.

UpdateTopicAsync(TopicDescription)

Asynchronously enables you to update the topic.

public Task<TopicDescription> UpdateTopicAsync(TopicDescription description)

Parameters

description TopicDescription

A TopicDescription object describing the topic to be updated.

Returns

Task<TopicDescription>

The asynchronous operation.