0
votes

I'm in the process of modifying this starter to suite my requirements:

https://github.com/spring-cloud-stream-app-starters/file/blob/master/spring-cloud-starter-stream-source-file/src/main/java/org/springframework/cloud/stream/app/file/source/FileSourceConfiguration.java

I'm trying to tap into the actual file that's being created in the folder the app is polling from and I wanna persist metadata about the file (and make certain decisions based on it) before it's being passed on to the output channel. E.g. looking at the tests, ContentPayloadTests.testSimpleFile() i wanna be able to access the test.txt file before a Message is generated and posted on the source.output() channel.

Any help is appreciated! Thanks!

1

1 Answers

0
votes

The solution was to implement a ChannelInterceptor interface's preSend method..

https://docs.spring.io/spring-integration/archive/1.0.0.M6/reference/html/ch02s05.html