Search code examples
spring-cloud-streamspring-cloud-dataflow

Is there any way to get notified or call another service once file is received at sftp-sink


Is there any way to get notified or call another service once file is written to an sftp sink, instead of creating another stream listening to the output location of the first stream?

I have a stream with sftp sink at the end of the stream. I need to call another service after file gets generated by sftp-sink at specified location.

One way is to create another stream listening at sftp-sink location. But I'm looking for a way without creating another stream.


Solution

  • It seems that you want an event after sftp-sink has completed writing a file without looking at the directory.

    I would suggest creating a custom processor that leverages the functionality of sftp-sink and then produces a message with the relevant information like the filename.