I'm using Azure Durable Functions to compute long, CPU-consuming process (implemented in a C++ node module). Message handling can take several minutes. I have set host.json so that messages are not processed in parallel :
"extensions": {
"queues": {
"batchSize": 1
}
},
I'm received messages via an HTTP trigger and my code is set to create a new OrchestrationClient on each message :
const client = df.getClient(context);
const instanceId = await client.startNew(functionName, undefined /* instanceId*/ , input);
I was hoping that Azure would automatically spawn a new instance (or at least an Orchestration) when a message is being processed and a new one is received. Unfortunately, instead of doing so, it just wait for the instance to be released. Is there a way to force Azure to create a new instance ? Can I use such thing as a Singleton to lock the instance and make it unuseable while it's busy? I have read on MSDN that the creation of instances relies on a heuristic that basically monitors the number of incoming events, which in my case is very low. I'm using Consomption plan.
Thanks