# 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](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/servicebus/Azure.Messaging.ServiceBus/MigrationGuide.md). > [!NOTE] > Microsoft.Azure.WebJobs.Extensions.ServiceBus Version 5 requires [`EnableCrossEntityTransactions`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.webjobs.servicebus.servicebusoptions.enablecrossentitytransactions) to be enabled in order to support sends atomic with receive. > > This can be done by adding the following to `host.json`: > > ``` > "extensions": { > "ServiceBus": { > "EnableCrossEntityTransactions": true > } > } > ``` ## 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](/nservicebus/hosting/azure-functions-service-bus/in-process/index.md#message-consistency). 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.