So you have a service that is using the AMQP protocol, and you want to build that into your formula, BUT there is no option to retry the step upon failure. What are you to do? No worries Cloud Elements has got you.
The basic idea behind the httpRequest step retry step option is to do just that, retry "x" number of times until success or the max limit is reached (5 retries). You can build the same logic into your amqpRequest step. Just follow along below...
1. figure out which status codes you want to retry on. It doesn't make sense to retry on ALL non 200 response codes because sometimes the failure is an unrefreshed token or something like that and no amount of retries will fix the root cause.
2. After you set up the basic info for the amqpRequest select "On Failure".
3. Select the "JS Script" step.
4. In the JS Script step build out the logic that will increment a counter to retry the amqpRequest step. Keep in mind keep this number relatively low (5 retries). If the number is massive you will ties up server resources, potently enraging your fellow Cloud Elements community.
5. Once the counter hits the max number of retries (5, see there's a common idea of ONLY 5 retires) have the JS Script step retry the hole formula. You will want to make sure you build in stop logic. This is incase the step keeps failing it does not get stuck in a infinite loop and never actually executes the flow.
Have fun with the amqpRequest step!