ServiceBusClient.CreateReceiver Method

Definition

Overloads

CreateReceiver(String)

Creates a ServiceBusReceiver instance that can be used for receiving and settling messages from a specific queue. It uses ServiceBusReceiveMode to specify how messages are received. Defaults to PeekLock mode. If you want to change the ServiceBusReceiveMode, use CreateReceiver(String, ServiceBusReceiverOptions) method. The ServiceBusReceiveMode is set in ServiceBusReceiverOptions.

CreateReceiver(String, ServiceBusReceiverOptions)

Creates a ServiceBusReceiver instance that can be used for receiving and settling messages from a specific queue. It uses ServiceBusReceiveMode to specify how messages are received. Defaults to PeekLock mode. The ServiceBusReceiveMode is set in ServiceBusReceiverOptions.

CreateReceiver(String, String)

Creates a ServiceBusReceiver instance that can be used for receiving and settling messages from a specific subscription. It uses ServiceBusReceiveMode to specify how messages are received. Defaults to PeekLock mode. If you want to change the ServiceBusReceiveMode, use CreateReceiver(String, String, ServiceBusReceiverOptions) method. The ServiceBusReceiveMode is set in ServiceBusReceiverOptions.

CreateReceiver(String, String, ServiceBusReceiverOptions)

Creates a ServiceBusReceiver instance that can be used for receiving and settling messages from a specific subscription. It uses ServiceBusReceiveMode to specify how messages are received. Defaults to PeekLock mode. The ServiceBusReceiveMode is set in ServiceBusReceiverOptions.

CreateReceiver(String)

Creates a ServiceBusReceiver instance that can be used for receiving and settling messages from a specific queue. It uses ServiceBusReceiveMode to specify how messages are received. Defaults to PeekLock mode. If you want to change the ServiceBusReceiveMode, use CreateReceiver(String, ServiceBusReceiverOptions) method. The ServiceBusReceiveMode is set in ServiceBusReceiverOptions.

public virtual Azure.Messaging.ServiceBus.ServiceBusReceiver CreateReceiver (string queueName);
abstract member CreateReceiver : string -> Azure.Messaging.ServiceBus.ServiceBusReceiver
override this.CreateReceiver : string -> Azure.Messaging.ServiceBus.ServiceBusReceiver
Public Overridable Function CreateReceiver (queueName As String) As ServiceBusReceiver

Parameters

queueName
String

The queue to create a ServiceBusReceiver for.

Returns

ServiceBusReceiver

A ServiceBusReceiver scoped to the specified queue.

Exceptions

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

Applies to

CreateReceiver(String, ServiceBusReceiverOptions)

Creates a ServiceBusReceiver instance that can be used for receiving and settling messages from a specific queue. It uses ServiceBusReceiveMode to specify how messages are received. Defaults to PeekLock mode. The ServiceBusReceiveMode is set in ServiceBusReceiverOptions.

public virtual Azure.Messaging.ServiceBus.ServiceBusReceiver CreateReceiver (string queueName, Azure.Messaging.ServiceBus.ServiceBusReceiverOptions options);
abstract member CreateReceiver : string * Azure.Messaging.ServiceBus.ServiceBusReceiverOptions -> Azure.Messaging.ServiceBus.ServiceBusReceiver
override this.CreateReceiver : string * Azure.Messaging.ServiceBus.ServiceBusReceiverOptions -> Azure.Messaging.ServiceBus.ServiceBusReceiver
Public Overridable Function CreateReceiver (queueName As String, options As ServiceBusReceiverOptions) As ServiceBusReceiver

Parameters

queueName
String

The queue to create a ServiceBusReceiver for.

options
ServiceBusReceiverOptions

The set of ServiceBusReceiverOptions to use for configuring the ServiceBusReceiver.

Returns

ServiceBusReceiver

A ServiceBusReceiver scoped to the specified queue.

Exceptions

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

Applies to

CreateReceiver(String, String)

Creates a ServiceBusReceiver instance that can be used for receiving and settling messages from a specific subscription. It uses ServiceBusReceiveMode to specify how messages are received. Defaults to PeekLock mode. If you want to change the ServiceBusReceiveMode, use CreateReceiver(String, String, ServiceBusReceiverOptions) method. The ServiceBusReceiveMode is set in ServiceBusReceiverOptions.

public virtual Azure.Messaging.ServiceBus.ServiceBusReceiver CreateReceiver (string topicName, string subscriptionName);
abstract member CreateReceiver : string * string -> Azure.Messaging.ServiceBus.ServiceBusReceiver
override this.CreateReceiver : string * string -> Azure.Messaging.ServiceBus.ServiceBusReceiver
Public Overridable Function CreateReceiver (topicName As String, subscriptionName As String) As ServiceBusReceiver

Parameters

topicName
String

The topic to create a ServiceBusReceiver for.

subscriptionName
String

The subscription specific to the specified topic to create a ServiceBusReceiver for.

Returns

ServiceBusReceiver

A ServiceBusReceiver scoped to the specified subscription and topic.

Exceptions

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

Applies to

CreateReceiver(String, String, ServiceBusReceiverOptions)

Creates a ServiceBusReceiver instance that can be used for receiving and settling messages from a specific subscription. It uses ServiceBusReceiveMode to specify how messages are received. Defaults to PeekLock mode. The ServiceBusReceiveMode is set in ServiceBusReceiverOptions.

public virtual Azure.Messaging.ServiceBus.ServiceBusReceiver CreateReceiver (string topicName, string subscriptionName, Azure.Messaging.ServiceBus.ServiceBusReceiverOptions options);
abstract member CreateReceiver : string * string * Azure.Messaging.ServiceBus.ServiceBusReceiverOptions -> Azure.Messaging.ServiceBus.ServiceBusReceiver
override this.CreateReceiver : string * string * Azure.Messaging.ServiceBus.ServiceBusReceiverOptions -> Azure.Messaging.ServiceBus.ServiceBusReceiver
Public Overridable Function CreateReceiver (topicName As String, subscriptionName As String, options As ServiceBusReceiverOptions) As ServiceBusReceiver

Parameters

topicName
String

The topic to create a ServiceBusReceiver for.

subscriptionName
String

The subscription specific to the specified topic to create a ServiceBusReceiver for.

options
ServiceBusReceiverOptions

The set of ServiceBusReceiverOptions to use for configuring the ServiceBusReceiver.

Returns

ServiceBusReceiver

A ServiceBusReceiver scoped to the specified subscription and topic.

Exceptions

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

Applies to