Created 05-08-2017 06:53 AM
Hi..
i am using invokeHttp processor to consume my rest api but whenever 5xx http error retrying back to same processor (invoke Http) but its hitting my infinite time ..i want to limit retry count 5 and it retry at certain time like first retry after 1 min and second after 30 min and vice versa ....thanks in advance
umair
Created on 05-08-2017 01:34 PM - edited 08-17-2019 06:50 PM
You could use the UpdateAttribute and RouteOnAttribute processors to create additional attributes on the flow file that keep track on the number of times the file has looped on a particular relationship. Here is an example of a flow that keep track of every relationship but the original flow file in the InvokeHttp processor:
Here is the configuration of the UpdateAttribute processor
The advanced UI in the RouteOnAttribute can be used to set the delay time using an attribute
Here is the configuration of the RouteOnAttribute processor
The delay is done using the ExecuteStreamCommand processor and calling the sleep command with the appropriate value to wait for the next attempt in using the InvokeHttp processor.
You can adjust for your need.
Created 05-10-2017 02:34 PM
C:\Users\bizruntime25>waitfor /T 10 test
ERROR: Timed out waiting for 'test'.
this is the output
Created on 05-10-2017 12:53 PM - edited 08-17-2019 06:49 PM
Created 05-11-2017 02:04 PM