您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

MessagingFactory.CreateSubscriptionClient MessagingFactory.CreateSubscriptionClient MessagingFactory.CreateSubscriptionClient Method

Definition

Overloads

CreateSubscriptionClient(String, String) CreateSubscriptionClient(String, String) CreateSubscriptionClient(String, String)

Creates a subscription client.

CreateSubscriptionClient(String, String, ReceiveMode) CreateSubscriptionClient(String, String, ReceiveMode)

Creates a new subscription client.

CreateSubscriptionClient(String, String) CreateSubscriptionClient(String, String) CreateSubscriptionClient(String, String)

Creates a subscription client.

public Microsoft.ServiceBus.Messaging.SubscriptionClient CreateSubscriptionClient (string topicPath, string name);
member this.CreateSubscriptionClient : string * string -> Microsoft.ServiceBus.Messaging.SubscriptionClient
Public Function CreateSubscriptionClient (topicPath As String, name As String) As SubscriptionClient

Parameters

topicPath
String String String

The topic path relative to the service namespace.

name
String String String

The name of the subscription.

Returns

The newly created subscription client.

Exceptions

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.

CreateSubscriptionClient(String, String, ReceiveMode) CreateSubscriptionClient(String, String, ReceiveMode)

Creates a new subscription client.

public Microsoft.ServiceBus.Messaging.SubscriptionClient CreateSubscriptionClient (string topicPath, string name, Microsoft.ServiceBus.Messaging.ReceiveMode receiveMode);
member this.CreateSubscriptionClient : string * string * Microsoft.ServiceBus.Messaging.ReceiveMode -> Microsoft.ServiceBus.Messaging.SubscriptionClient

Parameters

topicPath
String String String

The topic path relative to the service namespace.

name
String String String

The name of the subscription.

receiveMode
ReceiveMode ReceiveMode ReceiveMode

The receive mode.

Returns

The newly created subscription client.

Exceptions

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.

Applies to