Support Questions

Find answers, ask questions, and share your expertise

Nifi sftp - Wait for Control file before processing a file



We are pulling files from sftp server, and we get two types of files.

1. data file

2. control file


We need to wait for the control file before processing the data file.


Is there a recommended pattern to implement this behavior in nifi?


Thank you


Super Collaborator

First of all, the recommended pattern is to avoid this. The most common problems. people are trying to solve are waiting for a file to be copied, or depending on multiple files. In both cases you should be able fine by just listening to the directory.


If you actually have a more complicated situation, the first thing that comes to mind is a design with wait notify. Here is an article that explains this:


To help future readers please consider marking this as 'solved' and or valuable ('kudos') 

- Dennis Jaheruddin

If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.