Optimizing File and Message Transfers in Logic Apps Using Azure Service Bus

Optimizing File and Message Transfers in Logic Apps Using Azure Service Bus

Hello there! 👋🏻😀 Today, let’s explore how to use Azure Service Bus to pass files or messages within workflows without relying on a Function App. In my previous article, we discussed how to send data from Service Bus to Azure Logic App using a Function App. 👇🏻:

https://rit-17.medium.com/how-to-send-data-from-service-bus-to-logic-app-a2661606c847

Things You’ll Need:

  1. Create Standard Logic app:

https://rit-17.medium.com/how-to-send-data-from-service-bus-to-logic-app-a2661606c847

2. Create Azure service Bus:

Note: In the shared link below, please create only the Azure Service Bus.

https://rit-17.medium.com/how-to-send-data-from-service-bus-to-logic-app-a2661606c847

Next, let’s proceed to our Logic App and create the following two workflows:

Let’s design Workflow1 to accept a message or file as input, which will then be routed to the appropriate queue in the Service Bus.

  1. In the following image, I am providing employee data as input.

2.In the ‘Compose’ action, the Body content will now be stored

3. Finally, in the ‘Send Message’ action, the message is being enqueued.

Let us now proceed to design Workflow-2. In this workflow, any incoming message in the queue will trigger the retrieval of its content and subsequently send an email to the designated team member.

The trigger ‘When messages are available in the queue’ will activate solely when there are messages present in the designated queue; otherwise, it will be bypassed.

Now let’s test the our workflows:

Input:

We can confirm that the message has been successfully transmitted:

In Workflow-2, the message has been successfully received.

Output:

Conclusion:

The example above provides a sample representation of using Azure Service Bus. You can adapt it to suit your specific project requirements. Using Azure Service Bus to pass files or messages within workflows provides reliable messaging with built-in security and flexible delivery options. It enables scalable, decoupled application components and integrates seamlessly with Azure services. Advanced message handling features and cost-effective pricing make it ideal for dynamic workflows.

Thanks for stopping by! Your visit means a lot. Please Follow me😊 Stay tuned for more content. Exciting stuff coming your way soon! 🚀 #StayTuned.