Queue standard logic app failures and retry later

MS Techie 2,701 Reputation points
2024-02-18T17:45:10.7566667+00:00

We have azure standard logic app with Stateful workflows. We need to queue the failed workflows and retry later in 3 hours. How can we queue failed data from stateful workflows and retry later ? Or Does stateful workflows already queue data , which can be used later ?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,078 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 27,686 Reputation points Microsoft Employee
    2024-02-21T01:39:02.2366667+00:00

    Apologies for the delayed response @MS Techie.

    When your stateful workflow fails on execution, the state should be persisted from the point of failure. And you can configure your retry policy with interval set to PT3H for it to retry at your 3-hour interval.

    If you're not getting this experience or running into issues, please comment down below describing any errors you're receiving.


    EDIT 15 Mar 2024

    There's a 'peak-lock' pattern that you can look into. Where you read message off the queue and if the processing was successful, "complete" the message to delete it from the queue. If it's a failure, you abandon the message to it goes back to the queue for reprocessing. Reliably processing messages from Service Bus with Logic Apps | Your Azure Coach is a good blog post explaining this pattern.

    However, yes, you can build another workflow that involves reading from a "retry queue" and executes on your scheduled three hours. Basically, building your own retry-policy I linked above. Check out Azure Service Bus message sequencing and timestamps - Azure Service Bus | Microsoft Learn for more info.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.