How to retry sending the REST message again in case of Bad HTTP response

Sulabh Garg
Mega Sage
Mega Sage

Hi Community members,

In bidirectional integrations, if we are sending data to third party systems (Via REST messages) and if we receive the HTTP status codes (e.g.: 500) as acknowledgement then what is the best way to retry sending the REST message again after some specific intervals so that no request is skipped.

Use case - Once request generated, we need to send the data to third party application and we may have huge volume of requests generation, so we are planning to setup some error control.

Thanks in Advance.

 

Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg
1 ACCEPTED SOLUTION

Hi @Sulabh Garg ,

in that case, you have to implement a suitable error handler by your own.

I could image to create a custom table which acts as a queue for outbound requests. The records not only contain a configured RESTMessage object, but also some additional parameters like retry count and callback. A scheduled job could scan that table and execute the REST requests accordingly. In case of a successful response, the callback method is invoked.

Sounds like some efforts, but could be used many times and would be really helpful.

Kind regards
Maik

If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.

View solution in original post

7 REPLIES 7

To be honest, I don't understand how this table will help, because it only passively stores the results of the REST requests.

But you need a storage where you can queue the orders for requesting as well as the parameters for the retries.

If you don't like custom tables, you can try to find anything else, but at the moment I have no idea what alternative storage concept could fit. Maybe the ecc_queue but here you have to implement your own probes and sensors.

Just some thoughts by me. It is up to you to realize a solution 🙂 

Kind regards
Maik

If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.

Thanks for the detailed explanation. It helps.

Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg

Hello Sulabh 

If it is through workflow Runscript -"If Action" (There validate HTTP Status if any failure code then pass to No - Put turnstile activty (Declare how many times you want to run if its fails) ->Timer(wait for 10 mins after first call ) ->again Runscript (where you triggering the rest call)

 

Thanks