I am using Azure Functions 3.0.13 and referring to the documentation provided
I have one TimerTrigger that runs daily that puts 0...N messages on the service bus that is then processed by a function with a ServiceBusTrigger that consumes said messages.
Using the host.json input provided, however, I can see that all messages are processed at the same time regardless of setting maxConcurrentCalls to 1.
This is causing all functions to run in parallel and resulting in a deadlock on my database.
I can use the decorator [Singleton(Mode = SingletonMode.Function)] to run one at a time however this is affecting my throughput and I would rather be able to control how many messages can be processed in parallel at a time.
Am I misinterpreting the documentation or is this a bug?
host.json
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true
}
}
},
"functionTimeout": "01:00:00",
"extensions": {
"serviceBus": {
"prefetchCount": 1,
"messageHandlerOptions": {
"autoComplete": true,
"maxConcurrentCalls": 1,
"maxAutoRenewDuration": "00:05:00"
},
"batchOptions": {
"maxMessageCount": 1,
"operationTimeout": "00:05:00",
"autoComplete": true
}
},
"durableTask": {
"maxConcurrentActivityFunctions": 5,
"maxConcurrentOrchestratorFunctions": 1
}
}
}
Edit 1:
Sessions are not enabled on the service bus subscription,

