ServiceBusClient.CreateSender Method

Definition

Overloads

CreateSender(String)

Creates a ServiceBusSender instance that can be used for sending messages to a specific queue or topic.

CreateSender(String, ServiceBusSenderOptions)

Creates a ServiceBusSender instance that can be used for sending messages to a specific queue or topic.

CreateSender(String)

Source:
ServiceBusClient.cs
Source:
ServiceBusClient.cs

Creates a ServiceBusSender instance that can be used for sending messages to a specific queue or topic.

C#
public virtual Azure.Messaging.ServiceBus.ServiceBusSender CreateSender(string queueOrTopicName);

Parameters

queueOrTopicName
String

The queue or topic to create a ServiceBusSender for.

Returns

A ServiceBusSender scoped to the specified queue or topic.

Exceptions

The ServiceBusClient was constructed with a connection string containing the "EntityPath" token that has a different value than the queueOrTopicName value specified here.

Applies to

Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product Versions
Azure SDK for .NET Latest, Preview

CreateSender(String, ServiceBusSenderOptions)

Source:
ServiceBusClient.cs
Source:
ServiceBusClient.cs

Creates a ServiceBusSender instance that can be used for sending messages to a specific queue or topic.

C#
public virtual Azure.Messaging.ServiceBus.ServiceBusSender CreateSender(string queueOrTopicName, Azure.Messaging.ServiceBus.ServiceBusSenderOptions options);

Parameters

queueOrTopicName
String

The queue or topic to create a ServiceBusSender for.

options
ServiceBusSenderOptions

The set of ServiceBusSenderOptions to use when configuring the ServiceBusSender.

Returns

A ServiceBusSender scoped to the specified queue or topic.

Exceptions

The ServiceBusClient was constructed with a connection string containing the "EntityPath" token that has a different value than the queueOrTopicName value specified here.

Applies to

Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product Versions
Azure SDK for .NET Latest, Preview