ServiceBusClient.CreateSender(String) Method

Definition

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

ServiceBusSender

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