Support Questions

Find answers, ask questions, and share your expertise

NiFi: Flowfile retries

avatar
Expert Contributor

For e.g. PutHDFS processor, if the failure relationship is connected to itself

1) How to control the number of retries of a single flowfile?

2) I see "FlowFile Expiration" can be used to expire the message (meaning discard the Flowfile content if it cannot be reprocessed within a specified period of time). Is there a way to retain the FlowFile content after specified number of retries, that is to persist on a different channel say local file system (PutFile) and perhaps be able to send email notification ?

1 ACCEPTED SOLUTION

avatar
Master Mentor

@kumar

Check out this template as it will do exactly what you are looking for:

Retry_Count_Loop.xml

Just feed your failure relationship in to this process group and the output from this process group back to your processor.

Thanks,

Matt

View solution in original post

14 REPLIES 14

avatar
Master Mentor

The "sleep" command is a linux command. The command simply runs and waits the configured amount of time before exiting. Typically this command in linux is found under /usr/bin/sleep. I noticed above is missing the leading "/" . But if it is still not found, try searching your linux for it. It is installed as part of the linux "coreutils" rpm.

Matt

avatar
Contributor

@Matt Clarke

ok what is alternative command for windows .i already tried timeout and waitfor but both not work for me

avatar
Contributor

@Matt Clarke

thanks Matt for your help

umair

avatar
Master Mentor

@umair ahmed

I am not a Windows Admin and could not tell you off teh top of my head.

avatar
New Contributor

The template is not working now. Are there any alternatives??