CodexBloom - Programming Q&A Platform

Azure Logic Apps Timeout and Message Duplication implementing Service Bus Triggers

👀 Views: 1695 💬 Answers: 1 📅 Created: 2025-07-23
azure logic-apps service-bus http json

I'm working on a personal project and I'm wondering if anyone has experience with I've searched everywhere and can't find a clear answer..... I'm working with issues with my Azure Logic Apps where the Service Bus trigger sometimes times out and results in message duplication. My Logic App is set up to trigger on messages in a Service Bus queue, and it processes those messages using an HTTP action to call an external API. However, I've noticed that occasionally, the Logic App fails to acknowledge the message after processing it, and it gets retried due to the default visibility timeout settings on the Service Bus. I've configured the Logic App to handle the message processing with a timeout of 90 seconds, but it seems to exceed this duration under heavy load. The external API can take longer than anticipated to respond, especially during peak hours. I'm currently using the following HTTP action: ```json { "method": "POST", "uri": "https://myapi.com/endpoint", "headers": { "Content-Type": "application/json" }, "body": { "data": "@triggerBody()" } } ``` To mitigate the message duplication, I’ve tried implementing a deduplication strategy by storing the processed message IDs in an Azure Table Storage, but it hasn't been consistent, especially when the Logic App is retriggered multiple times. The behavior message I commonly see in the Logic App run history is: `"behavior processing the message: A timeout occurred while waiting for the response from the HTTP action"` Is there a more effective way to handle long-running HTTP requests in Logic Apps, or should I be considering alternative architectures like using Azure Functions for processing messages? Any guidance on best practices around this would be greatly appreciated! How would you solve this? This is part of a larger microservice I'm building. Any pointers in the right direction? What's the best practice here?