Skip to main content
Gold ⭐️⭐️
May 15, 2020 3:28 PM UTC
Solved

Apache Nifi - use of Notify and Wait with unknown amount of files

I tried to find out on myself, but after days of trying I decided that I need help. My usecase is to concat splitted zip-files (FilaA.zip.001, 002, 003 - 00x) and  I don't really know how many files will be delivered.  The files  are big and delivery takes time... The last file  to be delivered is a notification-file "ready.txt"

 

My current workflow is like this:

- receive alle files

-extract   number of zip-file   (001-x) and build a priority (999-number of zip-file) of it

-move to a queue with a PriorityAttributePrioritizer

-extract max number of files (i.e. 7 from 007 - the file with priority 992)

-move files via  notify processer to the wait processor

MelbarKasom_0-1589556094961.png

- in the wait processor I want to wait until the notfication-file  arrived and  deliver all the files in wait-queue

MelbarKasom_1-1589556254435.png

-after the the files will be concatenated  with the MergeContent processor and unzipped.

 

My configuration works only one time.  ... The second delivery with exact the same filenames as in the first delivery is directly moved to "success" and not into the wait queue... 

What I am doing wrong ?

 

anonymousAnswer
Gold ⭐️⭐️
May 15, 2020 3:47 PM UTC

I created a new MapCacheService and changed the release condition back to 

MelbarKasom_0-1589557626903.png

now it seems to work 🙂

2 replies

anonymousAuthorAnswer
Gold ⭐️⭐️
May 15, 2020 3:47 PM UTC

I created a new MapCacheService and changed the release condition back to 

MelbarKasom_0-1589557626903.png

now it seems to work 🙂

Translate
cjervis
Community Manager
Community Manager
May 20, 2020 12:43 PM UTC

I'm happy to see you resolved your issue. Please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. 

Screen Shot 2019-08-06 at 1.54.47 PM.pngmark as solution button

 

 

Translate
Keep the questions coming