0

I'm currently working on a POC with the following requirement: We have an Azure cosmos db that stores certain documents that need to be updated based on the events published by a Service Bus. To my knowledge, Cosmos DB cannot directly consume events from Service Bus. So, in order to establish the connectivity I'm working on a POC using an Azure logic app that reads the data from Service bus & then executes a stored procedure in Azure Cosmos DB. I have the following questions during the implementation:

  1. Is Logic app a good fit for this usecase? or are there any other better options available for this usecase. Two more options that we thought of are; Azure Function app OR a spring app deployed to an AKS (similar to our other projects) to establish connectivity b/w Service Bus & Cosmos DB
  2. What are some considerations to make the logic app production ready?

1 Answers1

0
  1. Functions require code. Logic apps is code less or low code so I would prefer Logic apps. Both Logic apps and Functions have binding which can be triggered via a message on Service bus. So would not recommend AKS which is quite costly as well.

  2. Switch on the high concurrency. Decide on whether you should go for consumption or standard Logic app by first comparing costs which depends on estimated number of executions. Think of how to handle any error during Stored procedure or logic app execution.

Anupam Chand
  • 2,209
  • 1
  • 5
  • 14
  • Yes, true that AKS is costly, but having the ability to write code would provide us flexibility to handle Disaster scenarios better. For instance, if the cosmos stored procedure threw an error then we can have code in-place to write the message to some other temporary storage and then retry it later. Would logic app have enough flexibility to achieve things like this? "Azure functions require code" - will this code be similar to 'normal java code written by adding Azure dependencies to the maven pom' as in a spring project that could be deployed to some AKS? – JustAnotherDev Jun 11 '23 at 17:59
  • Yes you can configure error/failure scenarios in logic app as well. As i said functions has bindings which listen for messages on the service bus. For AKS you will need to poll the service bus. My reco would be logic apps , functions and then AKS. – Anupam Chand Jun 11 '23 at 23:37