Getting Started
Architecture
Particular Service Platform
NServiceBus
Transports
Persistence
ServiceInsight
ServicePulse
ServiceControl
Monitoring
Samples

Azure Functions (in-process) for Service Bus Upgrade Version 2 to 3

Update to Microsoft.Azure.WebJobs.Extensions.ServiceBus SDK version 5

The dependency on Microsoft.Azure.WebJobs.Extensions.ServiceBus has been updated which means that the new Azure.Messaging.ServiceBus SDK is being used by the function host to receive messages. If the solution contains code that directly accesses native SDK types, read the Microsoft Migration Guide.

Manually invoking process message

In version 2 of the Azure Functions package, IFunctionEndpoint exposes two different Process methods where the one accepting a IMessageReceiver is the one that processed the message in "atomic sends with receive" mode.

Version 3 exposes different methods for the two different use cases.

Use:

Task ProcessAtomic(ServiceBusReceivedMessage message, ExecutionContext executionContext, ServiceBusClient serviceBusClient, ServiceBusMessageActions messageActions, ILogger functionsLogger = null);

to process the message with "atomic sends with receive" transaction mode.

Use:

Task ProcessNonAtomic(ServiceBusReceivedMessage message, ExecutionContext executionContext, ILogger functionsLogger = null);

to process the message in "receive only" transaction mode.

Injecting FunctionEndpoint

FunctionEndpoint can no longer be injected, use IFunctionEndpoint instead.

Related Articles