Azure function is processing multiple files in blob storage at same time. This is causing duplicate data creation in dynamics CRM because azure function is processing multiple file in parallel execution. Can someone help me , how i can restrict azure function to process one file at a time?
According to the section Trigger - concurrency and memory usage
of the offical document Azure Blob storage bindings for Azure Functions
, as the figure below.
The blob trigger uses a queue internally, so the maximum number of concurrent function invocations is controlled by the queues configuration in host.json. The default settings limit concurrency to 24 invocations. This limit applies separately to each function that uses a blob trigger.
So you can follow the content of the host.json
template file as below to set the queues.batchSize
value to 1
to restrict Azure Function with Blob Trigger to process one file per time.
As references, there are two similar SO threads which you can also refer to.