Created on 01-11-2024 05:45 AM - edited 01-11-2024 07:07 AM
I have a API which I need to make a call to get the response using InvokeHttpProcessor. Incase if response status code is not 200's then I need to do a retry for 3 times ( incase of 400's and 500's). I see that I can set a retry on Failure, NO retry and Retry relationships but that is not working as expected.
How to configure the relationships such that there I can achieve retry of 3 times on Failure, Retry and NoRetry relationships.
Also is there a way to see how many retries are performed and is nifi logging this information some where?
Created 01-11-2024 01:28 PM
@Anderosn
Is your InvokeHTTP processor triggered by a FlowFile from an inbound connection to the processor or does it have no inbound connections and executes purely based on configured run schedule? This is one of very few processors where an inbound connection is optional, but behavior is different dependent on the configuration chosen.
With no inbound connection there is no FlowFile to "retry" when you encounter "failure" or "No retry" result from execution. Because really it is retrying every time it executes essentially with no inbound connection. You could use a GenerateFlowFile processor to feed an empty trigger FlowFile to the invokeHTTP processor to trigger its execution. This would then give you a FlowFile that Retry configuration can use.
If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.
Thank you,
Matt
Created 01-11-2024 01:28 PM
@Anderosn
Is your InvokeHTTP processor triggered by a FlowFile from an inbound connection to the processor or does it have no inbound connections and executes purely based on configured run schedule? This is one of very few processors where an inbound connection is optional, but behavior is different dependent on the configuration chosen.
With no inbound connection there is no FlowFile to "retry" when you encounter "failure" or "No retry" result from execution. Because really it is retrying every time it executes essentially with no inbound connection. You could use a GenerateFlowFile processor to feed an empty trigger FlowFile to the invokeHTTP processor to trigger its execution. This would then give you a FlowFile that Retry configuration can use.
If you found any of the suggestions/solutions provided helped you with your issue, please take a moment to login and click "Accept as Solution" on one or more of them that helped.
Thank you,
Matt