on ‎2018 Aug 14 3:11 PM
I have a specific requirement where whenever a specific priority files comes into hot folder, this file should be picked up first before processing any of the file which are already in sequence , fileOrderCompartor can't help me. Any other way around this.
Thanks
Request clarification before answering.
Hi,
If you are using spring integration to poll the folder, it is possible to set a file name pattern for the inbound channel adapter. (or use separate folders like explained in previous comment)
<int-file:inbound-channel-adapter id="filesIn" directory="file:${input.directory}"
filename-regex="test[0-9]+\.txt" />
You would then need to wait for both documents before processing and then process them in order. This can be achieved by events or by object state.
Documentation for spring integration file support here: https://docs.spring.io/spring-integration/reference/html/files.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Better you create a two hot folders. one hot folder polling for every minute and another hot folder for every 5 minutes. instead of writing business logic to compare with fileOrderComparator.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.