Created 09-13-2016 07:02 AM
Hi, I'm trying to call a url using invokehttp processor using POST method , which will basically inserts some data into the database. The processor is working fine and but it is repeatedly calling the url which is making the data insertion fail due to duplicates issue and also increasing the network traffic. Is there any way i can configure in the processor that once the response from the url comes then stop calling the url again?.
Created 09-13-2016 07:50 AM
Hi,
You can schedule your job to be run once a day, once a week, etc. So if you want it to run only once I'd change the scheduling strategy. Otherwise, once your request has been sent you may want to just stop the processor. Another option is to use a second InvokeHttp to call the NiFi REST API to stop the first InvokeHttp.
But IMO, if you are using NiFi for a one time request, once it is done, stop the processor.
Created 09-13-2016 07:50 AM
Hi,
You can schedule your job to be run once a day, once a week, etc. So if you want it to run only once I'd change the scheduling strategy. Otherwise, once your request has been sent you may want to just stop the processor. Another option is to use a second InvokeHttp to call the NiFi REST API to stop the first InvokeHttp.
But IMO, if you are using NiFi for a one time request, once it is done, stop the processor.
Created 09-13-2016 10:04 AM
Thanks for the suggestions @Pierre Villard. I don't want to stop the processor , i want the processor to run but dont call the same url again and again. There will be list of urls will be passed to invokehttp processor and i want this processor to call url only once. Is there any way i can tell the processor that the response for this url has come so dont call it again , wait for next url and call it, if there is no urls then stop the processor.
Created 09-13-2016 10:53 AM
This article shows how to use a list of urls in an external file to iterate InvokeHttp
You can schedule GetFile to run once per day, week, etc.
If errors at the end of the flow inserting into a db, you can configure to ignore failure.