ServiceBusClient 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
ServiceBusClient() |
Can be used for mocking. |
ServiceBusClient(String) |
Initializes a new instance of the ServiceBusClient class. |
ServiceBusClient(String, TokenCredential) |
Initializes a new instance of the ServiceBusClient class. |
ServiceBusClient(String, ServiceBusClientOptions) |
Initializes a new instance of the ServiceBusClient class. |
ServiceBusClient(String, AzureNamedKeyCredential, ServiceBusClientOptions) |
Initializes a new instance of the ServiceBusClient class. |
ServiceBusClient(String, AzureSasCredential, ServiceBusClientOptions) |
Initializes a new instance of the ServiceBusClient class. |
ServiceBusClient(String, TokenCredential, ServiceBusClientOptions) |
Initializes a new instance of the ServiceBusClient class. |
ServiceBusClient()
- Source:
- ServiceBusClient.cs
- Source:
- ServiceBusClient.cs
Can be used for mocking.
protected ServiceBusClient ();
Protected Sub New ()
Applies to
ServiceBusClient(String)
- Source:
- ServiceBusClient.cs
- Source:
- ServiceBusClient.cs
Initializes a new instance of the ServiceBusClient class.
public ServiceBusClient (string connectionString);
new Azure.Messaging.ServiceBus.ServiceBusClient : string -> Azure.Messaging.ServiceBus.ServiceBusClient
Public Sub New (connectionString As String)
Parameters
- connectionString
- String
The connection string to use for connecting to the Service Bus namespace.
Remarks
If the connection string specifies a specific entity name, any subsequent calls to CreateSender(String), CreateReceiver(String), CreateProcessor(String) etc. must still specify the same entity name.
The connection string will recognize and apply properties populated by the Azure portal such as Endpoint, SharedAccessKeyName, SharedAccessKey, and EntityPath. Other values will be ignored; to configure the processor, please use the ServiceBusClientOptions.
Applies to
ServiceBusClient(String, TokenCredential)
- Source:
- ServiceBusClient.cs
- Source:
- ServiceBusClient.cs
Initializes a new instance of the ServiceBusClient class.
public ServiceBusClient (string fullyQualifiedNamespace, Azure.Core.TokenCredential credential);
new Azure.Messaging.ServiceBus.ServiceBusClient : string * Azure.Core.TokenCredential -> Azure.Messaging.ServiceBus.ServiceBusClient
Public Sub New (fullyQualifiedNamespace As String, credential As TokenCredential)
Parameters
- fullyQualifiedNamespace
- String
The fully qualified Service Bus namespace to connect to.
This is likely to be similar to {yournamespace}.servicebus.windows.net
.
- credential
- TokenCredential
The Azure managed identity credential to use for authorization. Access controls may be specified by the Service Bus namespace.
Applies to
ServiceBusClient(String, ServiceBusClientOptions)
- Source:
- ServiceBusClient.cs
- Source:
- ServiceBusClient.cs
Initializes a new instance of the ServiceBusClient class.
public ServiceBusClient (string connectionString, Azure.Messaging.ServiceBus.ServiceBusClientOptions options);
new Azure.Messaging.ServiceBus.ServiceBusClient : string * Azure.Messaging.ServiceBus.ServiceBusClientOptions -> Azure.Messaging.ServiceBus.ServiceBusClient
Public Sub New (connectionString As String, options As ServiceBusClientOptions)
Parameters
- connectionString
- String
The connection string to use for connecting to the Service Bus namespace.
- options
- ServiceBusClientOptions
The set of ServiceBusClientOptions to use for configuring this ServiceBusClient.
Remarks
If the connection string specifies a specific entity name, any subsequent calls to CreateSender(String), CreateReceiver(String), CreateProcessor(String) etc. must still specify the same entity name.
The connection string will recognize and apply properties populated by the Azure portal such as Endpoint, SharedAccessKeyName, SharedAccessKey, and EntityPath. Other values will be ignored; to configure the processor, please use the ServiceBusClientOptions.
Applies to
ServiceBusClient(String, AzureNamedKeyCredential, ServiceBusClientOptions)
- Source:
- ServiceBusClient.cs
- Source:
- ServiceBusClient.cs
Initializes a new instance of the ServiceBusClient class.
public ServiceBusClient (string fullyQualifiedNamespace, Azure.AzureNamedKeyCredential credential, Azure.Messaging.ServiceBus.ServiceBusClientOptions options = default);
new Azure.Messaging.ServiceBus.ServiceBusClient : string * Azure.AzureNamedKeyCredential * Azure.Messaging.ServiceBus.ServiceBusClientOptions -> Azure.Messaging.ServiceBus.ServiceBusClient
Public Sub New (fullyQualifiedNamespace As String, credential As AzureNamedKeyCredential, Optional options As ServiceBusClientOptions = Nothing)
Parameters
- fullyQualifiedNamespace
- String
The fully qualified Service Bus namespace to connect to.
This is likely to be similar to {yournamespace}.servicebus.windows.net
.
- credential
- AzureNamedKeyCredential
The AzureNamedKeyCredential to use for authorization. Access controls may be specified by the Service Bus namespace.
- options
- ServiceBusClientOptions
The set of ServiceBusClientOptions to use for configuring this ServiceBusClient.
Applies to
ServiceBusClient(String, AzureSasCredential, ServiceBusClientOptions)
- Source:
- ServiceBusClient.cs
- Source:
- ServiceBusClient.cs
Initializes a new instance of the ServiceBusClient class.
public ServiceBusClient (string fullyQualifiedNamespace, Azure.AzureSasCredential credential, Azure.Messaging.ServiceBus.ServiceBusClientOptions options = default);
new Azure.Messaging.ServiceBus.ServiceBusClient : string * Azure.AzureSasCredential * Azure.Messaging.ServiceBus.ServiceBusClientOptions -> Azure.Messaging.ServiceBus.ServiceBusClient
Public Sub New (fullyQualifiedNamespace As String, credential As AzureSasCredential, Optional options As ServiceBusClientOptions = Nothing)
Parameters
- fullyQualifiedNamespace
- String
The fully qualified Service Bus namespace to connect to.
This is likely to be similar to {yournamespace}.servicebus.windows.net
.
- credential
- AzureSasCredential
The AzureSasCredential to use for authorization. Access controls may be specified by the Service Bus namespace.
- options
- ServiceBusClientOptions
The set of ServiceBusClientOptions to use for configuring this ServiceBusClient.
Applies to
ServiceBusClient(String, TokenCredential, ServiceBusClientOptions)
- Source:
- ServiceBusClient.cs
- Source:
- ServiceBusClient.cs
Initializes a new instance of the ServiceBusClient class.
public ServiceBusClient (string fullyQualifiedNamespace, Azure.Core.TokenCredential credential, Azure.Messaging.ServiceBus.ServiceBusClientOptions options);
new Azure.Messaging.ServiceBus.ServiceBusClient : string * Azure.Core.TokenCredential * Azure.Messaging.ServiceBus.ServiceBusClientOptions -> Azure.Messaging.ServiceBus.ServiceBusClient
Public Sub New (fullyQualifiedNamespace As String, credential As TokenCredential, options As ServiceBusClientOptions)
Parameters
- fullyQualifiedNamespace
- String
The fully qualified Service Bus namespace to connect to.
This is likely to be similar to {yournamespace}.servicebus.windows.net
.
- credential
- TokenCredential
The Azure managed identity credential to use for authorization. Access controls may be specified by the Service Bus namespace.
- options
- ServiceBusClientOptions
The set of ServiceBusClientOptions to use for configuring this ServiceBusClient.
Applies to
Azure SDK for .NET