Hello @Alessandro Pirovano - Thanks again for reaching out & posting on the MS Q&A channel!
You do have the correct & minimal configuration for achieving the "one message at a time" processing. The reason why it may not be working as intended is probably that you have Version 5.x of the Service Bus Extension installed but yet in the host.json
file, you seem to be using the messageHandlerOptions
wrapping the maxConcurrentCalls
setting, which is an implementation for previous versions of the Service Bus extension.
If you, indeed, have the v5 of the Service Bus extension, you could omit the messageHandlerOptions
wrapper as follows:
{
"version": "2.0",
"extensions": {
"serviceBus": {
"serviceBus": {
"maxConcurrentCalls": 1
}
}
}
}
Alternatively, if you want to use the previous version of the Service Bus extension, you'll want to install the right version. For example, here's the NuGet package of the extension for version 4.3.0 (which will support your current setting in the host.json file): https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.ServiceBus/4.3.0
For a full reference on the exact differences between in host.json
file based on your target Service Bus extension version, please review our official doc: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-service-bus?tabs=in-process%2Cextensionv5%2Cextensionv3&pivots=programming-language-csharp#hostjson-settings
I hope this helps resolve the issue but if you continue to hit the same issue, let me know and we can dig deeper.