question

66343131 avatar image
0 Votes"
66343131 asked AnuragSingh-MSFT commented

How to ensure only one Azure Logic App Standard BlobTrigger runs at a time?

@MikeUrnun
I have one Logic App Standard (App service plan : l1v2:5) . The blob storage container will be getting multiple files . I want to trigger this logic app by using built in Blob Trigger connector , but I want to run the logic App run one at a time .
Suppose I have following types of files :

 File1.xml
 File2.xml
 File3.xml

Then The logic app will be triggered by picking up File1.txt first and then after completion of the process of File1.Txt , the logic app should trigger again to pick up the second file .
I followed this thread https://docs.microsoft.com/en-us/answers/questions/137342/how-to-ensure-only-one-azure-function-blobtrigger.html
as Logic app standard also works internally as a Function app , But unable to achieve it .

Also I have gone through this documentation https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-actions-triggers#operation-options
to make the "OperationOptions" : "SingleInstance" , but I am unable to achieve this

I am using a host.json V2.0 version

Please let me know if any other info is needed

azure-logic-apps
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @66343131, Following up to see if @MayankBargali-MSFT answer below helps. Do let us know if you have any queries.

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

0 Votes 0 ·

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered MayankBargali-MSFT edited

@66343131 Thanks for reaching out. As per your requirement as you want to run your logic app sequentially you can leverage the Concurrency Control on your blob trigger. By default, it would be off. You can enable the Concurrency Control with the Degree of Parallelism as 1 under the setting of your connector. Make sure that you have disabled the Split On under the settings and Number of blobs to return as 1 on the trigger configuration as below.

188347-storagenew.gif

I have tested the setup and the blob files are triggered sequentially.

Note: The trigger will be fired in the same sequence as you have uploaded the file to the storage account inside the particular container if you have configured the trigger to listen for the particular container.


storagenew.gif (412.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.