0
votes

I have a NIFI flow that moves files from one FTP server to another. The flow starts with ListSFTP processor and ends with the PutSFTP processor. The password required to authenticate with the PutSFTP processor is stored inside another application that exposes REST endpoints to get the password. I want to get the password once and use the same to put all fetched files into the destination SFTP server. Please advise where/how i can use the InvokeHTTP processor in this case so that it doesnt get invoked for each flow file (It doesnt make sense to fetch the password on a per flowfile basis).

1

1 Answers

0
votes

create a parallel flow that scheduled on time base depending on how long auth-token could live.

For example if token is valid during 60 min - then schedule it for every 45 min.

RequestAuth(InvokeHTTP) --> PutDistributedMapCache

and inside your main flow use FetchDistributedMapCache instead of InvokeHTTP