0

I am using azure service bus topic and I have enable session for it's subscription.

With in the my logic app i am inserting data using sql transaction which are coming from topic I am using topic Subscription(peek-lock) and in subscriber level concurrency is set to default as follows

enter image description here

According to my Understanding, my logic app(subscriber) should read ALL the messages and have to processed in FIFO
my logic app is like

enter image description here

which means it should insert data to the table in ordered manner

however when i checked in the trigger log it shows correct order but in database level you can see the order is not happening

enter image description here

Thili
  • 748
  • 1
  • 9
  • 21
  • The LImit is turned off, meaning multiple Logic App instances will run. You will need to enable the limit to have a single instance processing messages. – Sean Feldman Sep 09 '19 at 16:08
  • true we can set limit in to 1 and this problem will solve and another will create since i am inserting data in to database and if whole process takes 1 min to complete, maximum records that i can insert per day will be 1440. any other suggestions? – Thili Sep 09 '19 at 16:30

1 Answers1

2

Message ordering is a delicate business. You can have either message ordering or concurrent processing, but not both. The moment you make message ordering a must, you lose the ability to have concurrent processing. This is correct for both, Azure Service Bus Sessions and Logic Apps concurrency control. You could process multiple sessions, but each session would be still restricted to a single processor. Here's a post about it.

Sean Feldman
  • 23,443
  • 7
  • 55
  • 80
  • I know it's not quite the answer you were expecting, but ordered messaging is very tricky. Any messaging system that offers FIFO has restrictions around it. And the biggest restrictions is number of concurrent processors. – Sean Feldman Sep 10 '19 at 12:57
  • Yeah the thing is if i enable concurrency control limit and set it to the 1. it's ordering message as expected and will process to in order. this is a partially solve the issue But the problem here is, It took so much time since the processing is not happen in parallelly. for per record insertion it will take like 1 minute so with that solution i can't handle bulk insert operations. :-( anyway thanks for the explanation – Thili Sep 11 '19 at 06:45