I am looking forward to your advice on the following - I have a requirement where the logic app would trigger from Azure Service bus in sequence (FIFO) and wait for the previous instance of the logic app to get complete (either successful or failed).
Az Service Bus topic: Enforce Message Ordering
Logic App: Concurrency Control On and Degree of Parallelism to 1.
However, I have noticed it doesn't give the desired results, every time. The issue is: the Logic app is not triggering in the proper sequence - FIFO. Can I get some suggestions on this please.. Thanks,
You can use When a message is received in a topic subscription (peek-lock)
as the trigger. This trigger contains an option called Session Id --> Next Available
which will get the Messages in FIFO using Session Id. This option is not available in Auto Complete, It is only present in peek-lock.
Then in Service Bus Enable below 2 options(Support Ordering while creating topic and Enabling sessions while creating subscription):
While Creating Topic:
then while creating subscription inside topic:
And also use Concurrency and Parallelism to 1.
Output:
Sent 2 messages with session id's:
Then it triggers in Order:
1st Message:
2nd Message: