Skip to main content
scoutjohn
Gold ⭐️
Aug 17, 2023 9:11 AM UTC
Solved

How to pause after execution of 1000 flow files in NiFi

I have a template to do a post method using InvokeHTTP, there can be many number of post requests so, I want to pause the execution for 5 minutes after every 1000 flowfiles. Is it possible to get the count of flowfiles processed?

scoutjohn_0-1692263107429.png

I tried creating a counter, but sadly I couldn't come up with a logic to increase the count. 
 I do not have any release signal identifier to use Wait processor. 

please advise. Thanks in advance

SAMSAL
SAMSALAnswer
Platinum ⭐️⭐️⭐️
Aug 17, 2023 12:37 PM UTC

Hi @scoutjohn ,

 

Have you looked into ControlRate processor?

https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.12.1/org.apache.nifi.processors.standard.ControlRate/

In your case the processor configuration would be something like this:

SAMSAL_0-1692275812944.png

 

If that helps please accept solution.

Thanks

 

2 replies

SAMSAL
SAMSALAnswer
Platinum ⭐️⭐️⭐️
Aug 17, 2023 12:37 PM UTC

Hi @scoutjohn ,

 

Have you looked into ControlRate processor?

https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.12.1/org.apache.nifi.processors.standard.ControlRate/

In your case the processor configuration would be something like this:

SAMSAL_0-1692275812944.png

 

If that helps please accept solution.

Thanks

 

Translate
scoutjohn
scoutjohnAuthor
Gold ⭐️
Aug 17, 2023 1:29 PM UTC

I think this is what I was trying to achieve, pause the execution for some time after processing 1000 flowfiles . Thank you 

Translate