Azure function not executing queue messages in parallel

Ana Cristina Stefan 1 Reputation point
2021-07-26T14:21:40.027+00:00

Hello,

We've been trying to obtain parallelism in executing the queue messages of a kubernetes function app.
We tried adjusting the following params in config:
PSWorkerInProcConcurrencyUpperBound = 10
FUNCTIONS_WORKER_PROCESS_COUNT = 10

The result was that 2 messages were being picked up from the queue at a time, then after a couple of minutes other 2 messages were picked up..after a couple of minutes another 2 messages were picked up..all 6 running in parallel. We were expecting the parallelism to work like..picking up 10 messages at the same timestamp then another 10 etc.

We also tried adjusting the host.json file with the following (also tweaked the batches values to see a difference)

"extensions": {
"queues": {
"maxPollingInterval": "00:00:02",
"visibilityTimeout": "00:00:30",
"maxDequeueCount": 5,
"newBatchThreshold": 16,
"batchSize": 32
}
},

Unfortunately, this didn't give us the expected parallelism either.
Could you help us in understanding what we are doing wrong?

Many thanks,
Ana

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,993 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.