MessagingFactory.CreateSubscriptionClient Method (String, String, ReceiveMode)

 

Creates a new subscription client.

Namespace:   Microsoft.ServiceBus.Messaging
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

member CreateSubscriptionClient : 
        topicPath:string *
        name:string *
        receiveMode:ReceiveMode -> SubscriptionClient

Parameters

topicPath
Type: System.String

The topic path relative to the service namespace.

name
Type: System.String

The name of the subscription.

receiveMode
Type: Microsoft.ServiceBus.Messaging.ReceiveMode

The receive mode.

Return Value

Type: Microsoft.ServiceBus.Messaging.SubscriptionClient

The newly created subscription client.

Exception Condition
ArgumentException

The supplied topicPath is null or empty.

TimeoutException

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.

OperationCanceledException

The factory has been closed or aborted.

ArgumentOutOfRangeException

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

MessagingException

An internal error or unexpected exception occurs.

Return to top
Show: