Class ServiceBusClient | Azure SDK for Net
Inheritance
ServiceBusClient
Namespace: Azure.Messaging.ServiceBus
Assembly: Azure.Messaging.ServiceBus.dll
Syntax
public class ServiceBusClient : IAsyncDisposable
Constructors
ServiceBusClient()
Can be used for mocking.
Declaration
protected ServiceBusClient ();
ServiceBusClient(String)
Declaration
public ServiceBusClient (string connectionString);
Parameters
String connectionString The connection string to use for connecting to the Service Bus namespace. |
ServiceBusClient(String, TokenCredential)
Declaration
public ServiceBusClient (string fullyQualifiedNamespace, Azure.Core.TokenCredential credential);
Parameters
String fullyQualifiedNamespace The fully qualified Service Bus namespace to connect to. This is likely to be similar to |
TokenCredential credential The Azure managed identity credential to use for authorization. Access controls may be specified by the Service Bus namespace. |
ServiceBusClient(String, ServiceBusClientOptions)
Declaration
public ServiceBusClient (string connectionString, Azure.Messaging.ServiceBus.ServiceBusClientOptions options);
Parameters
ServiceBusClient(String, TokenCredential, ServiceBusClientOptions)
Declaration
public ServiceBusClient (string fullyQualifiedNamespace, Azure.Core.TokenCredential credential, Azure.Messaging.ServiceBus.ServiceBusClientOptions options);
Parameters
String fullyQualifiedNamespace The fully qualified Service Bus namespace to connect to. This is likely to be similar to |
TokenCredential credential The Azure managed identity credential to use for authorization. Access controls may be specified by the Service Bus namespace. |
ServiceBusClientOptions options The set of ServiceBusClientOptions to use for configuring this ServiceBusClient. |
Properties
FullyQualifiedNamespace
The fully qualified Service Bus namespace that the connection is associated with. This is likely to be similar to {yournamespace}.servicebus.windows.net
.
Declaration
public string FullyQualifiedNamespace { get; }
Property Value
IsDisposed
Declaration
public bool IsDisposed { get; }
Property Value
Boolean
|
TransportType
Declaration
public Azure.Messaging.ServiceBus.ServiceBusTransportType TransportType { get; }
Property Value
Methods
CreateDeadLetterReceiver(String, ServiceBusReceiverOptions)
Declaration
public Azure.Messaging.ServiceBus.ServiceBusReceiver CreateDeadLetterReceiver (string queueName, Azure.Messaging.ServiceBus.ServiceBusReceiverOptions options = null);
Parameters
Returns
CreateDeadLetterReceiver(String, String, ServiceBusReceiverOptions)
Declaration
public Azure.Messaging.ServiceBus.ServiceBusReceiver CreateDeadLetterReceiver (string topicName, string subscriptionName, Azure.Messaging.ServiceBus.ServiceBusReceiverOptions options = null);
Parameters
Returns
CreateProcessor(String)
Declaration
public Azure.Messaging.ServiceBus.ServiceBusProcessor CreateProcessor (string queueName);
Parameters
Returns
CreateProcessor(String, ServiceBusProcessorOptions)
Declaration
public Azure.Messaging.ServiceBus.ServiceBusProcessor CreateProcessor (string queueName, Azure.Messaging.ServiceBus.ServiceBusProcessorOptions options);
Parameters
Returns
CreateProcessor(String, String)
Declaration
public Azure.Messaging.ServiceBus.ServiceBusProcessor CreateProcessor (string topicName, string subscriptionName);
Parameters
Returns
CreateProcessor(String, String, ServiceBusProcessorOptions)
Declaration
public Azure.Messaging.ServiceBus.ServiceBusProcessor CreateProcessor (string topicName, string subscriptionName, Azure.Messaging.ServiceBus.ServiceBusProcessorOptions options);
Parameters
Returns
CreateReceiver(String, String, ServiceBusReceiverOptions)
Declaration
public Azure.Messaging.ServiceBus.ServiceBusReceiver CreateReceiver (string topicName, string subscriptionName, Azure.Messaging.ServiceBus.ServiceBusReceiverOptions options);
Parameters
Returns
CreateReceiver(String, String)
Declaration
public Azure.Messaging.ServiceBus.ServiceBusReceiver CreateReceiver (string topicName, string subscriptionName);
Parameters
Returns
CreateReceiver(String, ServiceBusReceiverOptions)
Declaration
public Azure.Messaging.ServiceBus.ServiceBusReceiver CreateReceiver (string queueName, Azure.Messaging.ServiceBus.ServiceBusReceiverOptions options);
Parameters
Returns
CreateReceiver(String)
Declaration
public Azure.Messaging.ServiceBus.ServiceBusReceiver CreateReceiver (string queueName);
Parameters
Returns
CreateSender(String)
Creates a ServiceBusSender instance that can be used for sending messages to a specific queue or topic.
Declaration
public Azure.Messaging.ServiceBus.ServiceBusSender CreateSender (string queueOrTopicName);
Parameters
Returns
CreateSender(String, ServiceBusSenderOptions)
Creates a ServiceBusSender instance that can be used for sending messages to a specific queue or topic.
Declaration
public Azure.Messaging.ServiceBus.ServiceBusSender CreateSender (string queueOrTopicName, Azure.Messaging.ServiceBus.ServiceBusSenderOptions options);
Parameters
Returns
CreateSessionProcessor(String, ServiceBusSessionProcessorOptions)
Declaration
public Azure.Messaging.ServiceBus.ServiceBusSessionProcessor CreateSessionProcessor (string queueName, Azure.Messaging.ServiceBus.ServiceBusSessionProcessorOptions options = null);
Parameters
Returns
CreateSessionProcessor(String, String, ServiceBusSessionProcessorOptions)
Declaration
public Azure.Messaging.ServiceBus.ServiceBusSessionProcessor CreateSessionProcessor (string topicName, string subscriptionName, Azure.Messaging.ServiceBus.ServiceBusSessionProcessorOptions options = null);
Parameters
Returns
CreateSessionReceiverAsync(String, ServiceBusSessionReceiverOptions, CancellationToken)
Declaration
[System.Diagnostics.DebuggerStepThrough] public virtual System.Threading.Tasks.Task<Azure.Messaging.ServiceBus.ServiceBusSessionReceiver> CreateSessionReceiverAsync (string queueName, Azure.Messaging.ServiceBus.ServiceBusSessionReceiverOptions options = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
Returns
CreateSessionReceiverAsync(String, String, ServiceBusSessionReceiverOptions, CancellationToken)
Declaration
[System.Diagnostics.DebuggerStepThrough] public virtual System.Threading.Tasks.Task<Azure.Messaging.ServiceBus.ServiceBusSessionReceiver> CreateSessionReceiverAsync (string topicName, string subscriptionName, Azure.Messaging.ServiceBus.ServiceBusSessionReceiverOptions options = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
Returns
DisposeAsync()
Performs the task needed to clean up resources used by the Azure.Messaging.ServiceBus.ServiceBusConnection, including ensuring that the connection itself has been closed.
Declaration
[System.Diagnostics.DebuggerStepThrough] public virtual System.Threading.Tasks.ValueTask DisposeAsync ();
Returns
ValueTask A task to be resolved on when the operation has completed. |
ncG1vNJzZmiZqqq%2Fpr%2FDpJuom6Njr627wWeaqKqVY8SqusOorqxmnprBcHDWnplonJ%2Bpu6bAjnqxrqqVY5qmv9KanqKml2Ogpr7VopqeeqWofHh6j2dnZqiimsOqsdZnbWiZoJ58gsbUq5xnhZWowKKzyKeeZ4uVp8Oqr8R7rKxnca%2FCs7GNhpysq5Gctq%2BzjYycq66ZmLKDwdJnip6qpp6wpo7UrHqloZWjwW%2B006aj