Of course, you can use events/messages for this scenario. If this is a very simple scenario you could have service A call Service B directly using an HTTP call. This direct calling will result in a tight coupling of both services, so you should consider if you can afford this kind of coupling. If not go for a message based solution.
Communication between web apps
I'm hosting two apps services (REST APIs) on Azure and I want to make them communicate.
My client is sending an HTTP request to create an order using app service A and I want that app service A send the ceated order to app service B in order to process it following another logic.
This is the only communication that will be between app service A and app service B.
I was planning to use an Azure Event Grid topic to set the communication between them so that app service A publishes and app service B subscribes.
Is it reasonnable or is it overkill ? What do you think ?
Thank you in advance for your answers
2 answers
Sort by: Most helpful
-
-
Bruce (SqlWork.com) 74,531 Reputation points
2023-10-07T19:46:30.31+00:00 It depends on if the client needs to know if B’s processing completed. If B’s can be done in the background, then the grid is a simple queue and makes sense.