0

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.

Artem Bilan
  • 113,505
  • 11
  • 91
  • 118
Venu Gopal
  • 15
  • 1
  • 7
  • You probably can do that with Fan-Out pattern: https://dataflow.spring.io/docs/feature-guides/streams/fanin-fanout/. Nothing to do with Spring Integration or RabbitMQ. Please, consider in the future to choose tags for questions properly. – Artem Bilan Dec 02 '22 at 18:18

1 Answers1

0

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.

  • Hi Corneil, Thanks for your reply. So, as per my understanding, I need to clone the s3-sink(we have moved to s3 now) project and need convert it as processor and add custom code to call our API. Please correct me if I'm wrong and It would be helpful, if you can guide me in this regard. – Venu Gopal Jan 10 '23 at 10:50