I have a Functions app on Consumption plan with a queue triggered function that does some data processing and writes to Azure SQL. Each run takes aprox 1 min and I need to process around 1000 messages arriving at one time. I worry about many of these runs hitting the database at the same time while I am ok letting the total time extend longer. This is how my host.json looks at the moment
{
"functionTimeout": "00:09:50",
"queues": {
"maxPollingInterval": 5000,
"visibilityTimeout" : "00:05:00",
"maxDequeueCount": 5,
"batchSize": 4,
"newBatchThreshold": 2
}
}
I am more concerned with reliability than with the total time so I thought a way to improve the solution would be to limit the maximum number of concurrent consumption units and take longer to go through the 1000 messages. Any way to set a max number of concurrent consumption units? Other advise in improving reliability for queue triggered consumption functions would be appreciated.