Show / Hide Table of Contents

Class MessagingProvider

This class provides factory methods for the creation of instances used for Service Bus message processing. It can be overriden to customize any of the client creation methods.

Inheritance
System.Object
MessagingProvider
Namespace: System.Dynamic.ExpandoObject
Assembly: Microsoft.Azure.WebJobs.Extensions.ServiceBus.dll
Syntax
public class MessagingProvider

Constructors

MessagingProvider(IOptions<ServiceBusOptions>)

Initializes a new instance of MessagingProvider. This is called by the Functions runtime as part of start up.

Declaration
public MessagingProvider (Microsoft.Extensions.Options.IOptions<Microsoft.Azure.WebJobs.ServiceBus.ServiceBusOptions> options);
Parameters
Microsoft.Extensions.Options.IOptions<ServiceBusOptions> options

The options that are used to configure the client instances.

Exceptions
System.ArgumentNullException

The options instance is null.

Methods

CreateBatchMessageReceiver(ServiceBusClient, String, ServiceBusReceiverOptions)

Creates a Azure.Messaging.ServiceBus.ServiceBusReceiver that will be used to receive a batch of messages.

Declaration
protected internal virtual Azure.Messaging.ServiceBus.ServiceBusReceiver CreateBatchMessageReceiver (Azure.Messaging.ServiceBus.ServiceBusClient client, string entityPath, Azure.Messaging.ServiceBus.ServiceBusReceiverOptions options);
Parameters
Azure.Messaging.ServiceBus.ServiceBusClient client

The client that is being used to communicate with the service.

System.String entityPath

The path to the Service Bus entity that is being received from.

Azure.Messaging.ServiceBus.ServiceBusReceiverOptions options

The set of options to use for configuring the receiver. These options are computed from the ServiceBusOptions passed to the MessagingProvider constructor.

Returns
Azure.Messaging.ServiceBus.ServiceBusReceiver

A receiver that will be used by the extension to receive a batch of messages.

Remarks

This method is called for functions that bind to multiple messages.

CreateClient(String, ServiceBusClientOptions)

Creates a Azure.Messaging.ServiceBus.ServiceBusClient to use for communicating with the service.

Declaration
protected internal virtual Azure.Messaging.ServiceBus.ServiceBusClient CreateClient (string connectionString, Azure.Messaging.ServiceBus.ServiceBusClientOptions options);
Parameters
System.String connectionString

The connection string to use for connecting to the Service Bus namespace.

Azure.Messaging.ServiceBus.ServiceBusClientOptions options

The set of options to use for configuring the client. These options are computed from the ServiceBusOptions passed to the MessagingProvider constructor.

Returns
Azure.Messaging.ServiceBus.ServiceBusClient

The client that will be used by the extension for communicating with the service.

CreateClient(String, TokenCredential, ServiceBusClientOptions)

Creates a Azure.Messaging.ServiceBus.ServiceBusClient to use for communicating with the service.

Declaration
protected internal virtual Azure.Messaging.ServiceBus.ServiceBusClient CreateClient (string fullyQualifiedNamespace, Azure.Core.TokenCredential credential, Azure.Messaging.ServiceBus.ServiceBusClientOptions options);
Parameters
System.String fullyQualifiedNamespace

The connection string to use for connecting to the Service Bus namespace.

Azure.Core.TokenCredential credential

The Azure managed identity credential to use for authorization. Access controls may be specified by the Service Bus namespace.

Azure.Messaging.ServiceBus.ServiceBusClientOptions options

The set of options to use for configuring the client. These options are computed from the ServiceBusOptions passed to the MessagingProvider constructor.

Returns
Azure.Messaging.ServiceBus.ServiceBusClient

The client that will be used by the extension for communicating with the service.

CreateMessageProcessor(ServiceBusClient, String, ServiceBusProcessorOptions)

Creates a MessageProcessor instance that will be used to process messages.

Declaration
protected internal virtual Microsoft.Azure.WebJobs.ServiceBus.MessageProcessor CreateMessageProcessor (Azure.Messaging.ServiceBus.ServiceBusClient client, string entityPath, Azure.Messaging.ServiceBus.ServiceBusProcessorOptions options);
Parameters
Azure.Messaging.ServiceBus.ServiceBusClient client

The client that is being used to communicate with the service.

System.String entityPath

The path to the Service Bus entity that is being received from.

Azure.Messaging.ServiceBus.ServiceBusProcessorOptions options

The set of options to use for configuring the processor. These options are computed from the ServiceBusOptions passed to the MessagingProvider constructor.

Returns
MessageProcessor

A message processor that will be used by the extension.

CreateMessageSender(ServiceBusClient, String)

Creates a Azure.Messaging.ServiceBus.ServiceBusSender that will be used to send messages to the queue or topic.

Declaration
protected internal virtual Azure.Messaging.ServiceBus.ServiceBusSender CreateMessageSender (Azure.Messaging.ServiceBus.ServiceBusClient client, string entityPath);
Parameters
Azure.Messaging.ServiceBus.ServiceBusClient client

The client that is being used to communicate with the service.

System.String entityPath

The path to the Service Bus entity that is being received from.

Returns
Azure.Messaging.ServiceBus.ServiceBusSender

A sender that the extension will use to send messages.

CreateProcessor(ServiceBusClient, String, ServiceBusProcessorOptions)

Creates a Azure.Messaging.ServiceBus.ServiceBusProcessor instance that will be used to receive messages from the entity.

Declaration
protected internal virtual Azure.Messaging.ServiceBus.ServiceBusProcessor CreateProcessor (Azure.Messaging.ServiceBus.ServiceBusClient client, string entityPath, Azure.Messaging.ServiceBus.ServiceBusProcessorOptions options);
Parameters
Azure.Messaging.ServiceBus.ServiceBusClient client

The client that is being used to communicate with the service.

System.String entityPath

The path to the Service Bus entity that is being received from.

Azure.Messaging.ServiceBus.ServiceBusProcessorOptions options

The set of options to use for configuring the processor. These options are computed from the ServiceBusOptions passed to the MessagingProvider constructor.

Returns
Azure.Messaging.ServiceBus.ServiceBusProcessor

A Azure.Messaging.ServiceBus.ServiceBusProcessor that will be used by the extension.

Remarks

This method is called for functions that bind to a single message.

CreateSessionMessageProcessor(ServiceBusClient, String, ServiceBusSessionProcessorOptions)

Creates a SessionMessageProcessor instance that will be used to process messages.

Declaration
protected internal virtual Microsoft.Azure.WebJobs.ServiceBus.SessionMessageProcessor CreateSessionMessageProcessor (Azure.Messaging.ServiceBus.ServiceBusClient client, string entityPath, Azure.Messaging.ServiceBus.ServiceBusSessionProcessorOptions options);
Parameters
Azure.Messaging.ServiceBus.ServiceBusClient client

The client that is being used to communicate with the service.

System.String entityPath

The path to the Service Bus entity that is being received from.

Azure.Messaging.ServiceBus.ServiceBusSessionProcessorOptions options

The set of options to use for configuring the processor. These options are computed from the ServiceBusOptions passed to the MessagingProvider constructor.

Returns
SessionMessageProcessor

A message processor that will be used by the extension.

CreateSessionProcessor(ServiceBusClient, String, ServiceBusSessionProcessorOptions)

Creates a Azure.Messaging.ServiceBus.ServiceBusProcessor instance that will be used to receive messages from the entity.

Declaration
protected internal virtual Azure.Messaging.ServiceBus.ServiceBusSessionProcessor CreateSessionProcessor (Azure.Messaging.ServiceBus.ServiceBusClient client, string entityPath, Azure.Messaging.ServiceBus.ServiceBusSessionProcessorOptions options);
Parameters
Azure.Messaging.ServiceBus.ServiceBusClient client

The client that is being used to communicate with the service.

System.String entityPath

The path to the Service Bus entity that is being received from.

Azure.Messaging.ServiceBus.ServiceBusSessionProcessorOptions options

The set of options to use for configuring the processor. These options are computed from the ServiceBusOptions passed to the MessagingProvider constructor.

Returns
Azure.Messaging.ServiceBus.ServiceBusSessionProcessor

A Azure.Messaging.ServiceBus.ServiceBusProcessor that will be used by the extension.

Remarks

This method is called for functions that bind to a single message.

Back to top Azure SDK for .NET