MessagingFactory.CreateSubscriptionClient Method

Definition

Overloads

CreateSubscriptionClient(String, String)

Creates a subscription client.

CreateSubscriptionClient(String, String, ReceiveMode)

Creates a new subscription client.

CreateSubscriptionClient(String, String)

Creates a subscription client.

public Microsoft.ServiceBus.Messaging.SubscriptionClient CreateSubscriptionClient (string topicPath, string name);
Parameters
topicPath
String

The topic path relative to the service namespace.

name
String

The name of the subscription.

Returns

The newly created subscription client.

Exceptions

The supplied topicPath is null or empty.

The length of topicPath is greater than Microsoft.ServiceBus.Messaging.Constants.TopicNameMaximumLength.

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

An internal error or unexpected exception occurs.

The factory has been closed or aborted.

CreateSubscriptionClient(String, String, ReceiveMode)

Creates a new subscription client.

public Microsoft.ServiceBus.Messaging.SubscriptionClient CreateSubscriptionClient (string topicPath, string name, Microsoft.ServiceBus.Messaging.ReceiveMode receiveMode);
Parameters
topicPath
String

The topic path relative to the service namespace.

name
String

The name of the subscription.

receiveMode
ReceiveMode

The receive mode.

Returns

The newly created subscription client.

Exceptions

The supplied topicPath is null or empty.

The length of topicPath is greater than Microsoft.ServiceBus.Messaging.Constants.TopicNameMaximumLength.

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

An internal error or unexpected exception occurs.

The factory has been closed or aborted.

Applies to