Overview
I have an Azure httpTrigger and a queueTrigger in Python in one Function App on a Consumption plan. The httpTrigger creates messages for the queue trigger to process. The processing of the queue messages takes around 5 minutes for longer runs and under 1 minute for shorter runs.
host.json
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensions": {
"queues": {
"maxDequeueCount": 1,
"batchSize": 1,
"newBatchThreshold": 0
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[3.3.0, 4.0.0)"
},
"concurrency": {
"dynamicConcurrencyEnabled": false,
"snapshotPersistenceEnabled": false
},
"functionTimeout": "00:10:00"
}
Related Attributes
batchSize: 1, newBatchThreshold: 0, dynamicConcurrencyEnabled: false, snapshotPersistenceEnabled: false,
Problem
With these four properties in host.json and based on everything I've read online, each function instance is expected to only process one queue message at a time.
However, when I send 8 requests, all requests are being processed at the same time but there's only 1 instance of my App running. I've confirmed this by running a query in the logs and by monitoring Analytics Insights.
Is there another settings I'm missing to enforce 1 message processing per instance?
Please note that I'm aware that Consumption plans scale out and multiple messages can be processed by different instances simultaneously but that's not an issue for my use case.
Function App Essentials