Search code examples
azurearchitectureazureservicebusazure-servicebus-topics

How to collect results from multiple azure app services and push to a topic


I have 3 Azure service bus topics, 3 azure app services subscribe to these topic messages and perform some actions and return results.

I want to push a message to another topic with the collective results (failure/success) from the above 3 app services.

How can this be achieved?

The sample flow chart below:

Sample flowchart


Solution

  • One of the options to solve this is to leverage the Azure Service Bus Message Sessions feature. It allows handling messages and keeping the state using a single service. You'd have 3 message types (events) published by the upstream services (Payment, Email, and Notification), and a fourth message type, a timeout. This is also known as a saga pattern. I've described the implementation with Azure Service Bus in detail in this blog post.