Jul 12th, 2012, 05:54 PM
Aggregator Release Strategy - zipping files when all files arrive
Thank you for Spring Integration! I can't stop admiring its beauty. So awesome!
I thought I figured out most of the stuff based on the samples.
Kinda stuck at the release strategy of the aggregator.
As a user, I see a list of files processed and aggregated into a tar gz file, so that I save space on my disk.
I figured I would use:
1. File Inbound adapter and recursive scan strategy to read from a directory
2. Handler or transformer to "decorate" the Message<File> with the metadata
3. *** Need to figure out how to tell the aggregator start tar-gz the Message<File>.
The aggregator should start tar gz when all files in the inbound adapter directory has been read and processed.
How does the processor/transformer tell the aggregator down stream? Setting SEQUENCE_SIZE? How to retrieve the SEQUENCE_SIZE of a particular directory?
Jul 13th, 2012, 02:36 AM
As I see you need some correlation and aggrregation logic, but "File Inbound adapter" doesn't have them .
Try to investigate <resource-inbound-channel-adapter/>.
It retrives Resource by provided pattern, then you can place your tar-gz service as adapter's downstream.
Will it be enoung?
Tags for this Thread