SubscriptionClient Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SubscriptionClient(ServiceBusConnectionStringBuilder, String, ReceiveMode, RetryPolicy) |
Instantiates a new SubscriptionClient to perform operations on a subscription. |
SubscriptionClient(ServiceBusConnection, String, String, ReceiveMode, RetryPolicy) |
Creates a new instance of the Subscription client on a given ServiceBusConnection |
SubscriptionClient(String, String, String, ReceiveMode, RetryPolicy) |
Instantiates a new SubscriptionClient to perform operations on a subscription. |
SubscriptionClient(String, String, String, ITokenProvider, TransportType, ReceiveMode, RetryPolicy) |
Creates a new instance of the Subscription client using the specified endpoint, entity path, and token provider. |
SubscriptionClient(ServiceBusConnectionStringBuilder, String, ReceiveMode, RetryPolicy)
- Source:
- SubscriptionClient.cs
Instantiates a new SubscriptionClient to perform operations on a subscription.
public SubscriptionClient (Microsoft.Azure.ServiceBus.ServiceBusConnectionStringBuilder connectionStringBuilder, string subscriptionName, Microsoft.Azure.ServiceBus.ReceiveMode receiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy = default);
new Microsoft.Azure.ServiceBus.SubscriptionClient : Microsoft.Azure.ServiceBus.ServiceBusConnectionStringBuilder * string * Microsoft.Azure.ServiceBus.ReceiveMode * Microsoft.Azure.ServiceBus.RetryPolicy -> Microsoft.Azure.ServiceBus.SubscriptionClient
Public Sub New (connectionStringBuilder As ServiceBusConnectionStringBuilder, subscriptionName As String, Optional receiveMode As ReceiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Optional retryPolicy As RetryPolicy = Nothing)
Parameters
- connectionStringBuilder
- ServiceBusConnectionStringBuilder
ServiceBusConnectionStringBuilder having namespace and topic information.
- subscriptionName
- String
- receiveMode
- ReceiveMode
Mode of receive of messages. Defaults to ReceiveMode.PeekLock.
- retryPolicy
- RetryPolicy
Retry policy for subscription operations. Defaults to Default
Remarks
Creates a new connection to the subscription, which is opened during the first receive operation.
Applies to
SubscriptionClient(ServiceBusConnection, String, String, ReceiveMode, RetryPolicy)
- Source:
- SubscriptionClient.cs
Creates a new instance of the Subscription client on a given ServiceBusConnection
public SubscriptionClient (Microsoft.Azure.ServiceBus.ServiceBusConnection serviceBusConnection, string topicPath, string subscriptionName, Microsoft.Azure.ServiceBus.ReceiveMode receiveMode, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy);
new Microsoft.Azure.ServiceBus.SubscriptionClient : Microsoft.Azure.ServiceBus.ServiceBusConnection * string * string * Microsoft.Azure.ServiceBus.ReceiveMode * Microsoft.Azure.ServiceBus.RetryPolicy -> Microsoft.Azure.ServiceBus.SubscriptionClient
Public Sub New (serviceBusConnection As ServiceBusConnection, topicPath As String, subscriptionName As String, receiveMode As ReceiveMode, retryPolicy As RetryPolicy)
Parameters
- serviceBusConnection
- ServiceBusConnection
Connection object to the service bus namespace.
- topicPath
- String
Topic path.
- subscriptionName
- String
Subscription name.
- receiveMode
- ReceiveMode
Mode of receive of messages. Defaults to ReceiveMode.PeekLock.
- retryPolicy
- RetryPolicy
Retry policy for subscription operations. Defaults to Default
Applies to
SubscriptionClient(String, String, String, ReceiveMode, RetryPolicy)
- Source:
- SubscriptionClient.cs
Instantiates a new SubscriptionClient to perform operations on a subscription.
public SubscriptionClient (string connectionString, string topicPath, string subscriptionName, Microsoft.Azure.ServiceBus.ReceiveMode receiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy = default);
new Microsoft.Azure.ServiceBus.SubscriptionClient : string * string * string * Microsoft.Azure.ServiceBus.ReceiveMode * Microsoft.Azure.ServiceBus.RetryPolicy -> Microsoft.Azure.ServiceBus.SubscriptionClient
Public Sub New (connectionString As String, topicPath As String, subscriptionName As String, Optional receiveMode As ReceiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Optional retryPolicy As RetryPolicy = Nothing)
Parameters
- connectionString
- String
Namespace connection string. Must not contain topic or subscription information.
- topicPath
- String
- subscriptionName
- String
- receiveMode
- ReceiveMode
Mode of receive of messages. Defaults to ReceiveMode.PeekLock.
- retryPolicy
- RetryPolicy
Retry policy for subscription operations. Defaults to Default
Remarks
Creates a new connection to the subscription, which is opened during the first receive operation.
Applies to
SubscriptionClient(String, String, String, ITokenProvider, TransportType, ReceiveMode, RetryPolicy)
- Source:
- SubscriptionClient.cs
Creates a new instance of the Subscription client using the specified endpoint, entity path, and token provider.
public SubscriptionClient (string endpoint, string topicPath, string subscriptionName, Microsoft.Azure.ServiceBus.Primitives.ITokenProvider tokenProvider, Microsoft.Azure.ServiceBus.TransportType transportType = Microsoft.Azure.ServiceBus.TransportType.Amqp, Microsoft.Azure.ServiceBus.ReceiveMode receiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy = default);
new Microsoft.Azure.ServiceBus.SubscriptionClient : string * string * string * Microsoft.Azure.ServiceBus.Primitives.ITokenProvider * Microsoft.Azure.ServiceBus.TransportType * Microsoft.Azure.ServiceBus.ReceiveMode * Microsoft.Azure.ServiceBus.RetryPolicy -> Microsoft.Azure.ServiceBus.SubscriptionClient
Public Sub New (endpoint As String, topicPath As String, subscriptionName As String, tokenProvider As ITokenProvider, Optional transportType As TransportType = Microsoft.Azure.ServiceBus.TransportType.Amqp, Optional receiveMode As ReceiveMode = Microsoft.Azure.ServiceBus.ReceiveMode.PeekLock, Optional retryPolicy As RetryPolicy = Nothing)
Parameters
- endpoint
- String
Fully qualified domain name for Service Bus. Most likely, {yournamespace}.servicebus.windows.net
- topicPath
- String
Topic path.
- subscriptionName
- String
Subscription name.
- tokenProvider
- ITokenProvider
Token provider which will generate security tokens for authorization.
- transportType
- TransportType
Transport type.
- receiveMode
- ReceiveMode
Mode of receive of messages. Defaults to ReceiveMode.PeekLock.
- retryPolicy
- RetryPolicy
Retry policy for subscription operations. Defaults to Default
Remarks
Creates a new connection to the subscription, which is opened during the first receive operation.
Applies to
Azure SDK for .NET