다음을 통해 공유


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.

public virtual Azure.Messaging.ServiceBus.ServiceBusSender CreateSender (string queueOrTopicName);
abstract member CreateSender : string -> Azure.Messaging.ServiceBus.ServiceBusSender
override this.CreateSender : string -> Azure.Messaging.ServiceBus.ServiceBusSender
Public Overridable Function CreateSender (queueOrTopicName As String) As ServiceBusSender

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

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.

public virtual Azure.Messaging.ServiceBus.ServiceBusSender CreateSender (string queueOrTopicName, Azure.Messaging.ServiceBus.ServiceBusSenderOptions options);
abstract member CreateSender : string * Azure.Messaging.ServiceBus.ServiceBusSenderOptions -> Azure.Messaging.ServiceBus.ServiceBusSender
override this.CreateSender : string * Azure.Messaging.ServiceBus.ServiceBusSenderOptions -> Azure.Messaging.ServiceBus.ServiceBusSender
Public Overridable Function CreateSender (queueOrTopicName As String, options As ServiceBusSenderOptions) As ServiceBusSender

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