I was using the sample configuration from https://github.com/spring-projects/spring-integration-aws for an Inbound Channel Adapter, but I have a bucket that will contain subdirectories with CSV's inside.
Is there a way to replicate locally the bucket tree structure? I have only managed to copy the files from inside the subdirs, but they end up being created right in the root of the directory that I set with messageSource.setLocalDirectory(LOCAL_FOLDER);
Or is there a way to identify what bucket subdir the file came from?
@Bean
@InboundChannelAdapter(value = "s3FilesChannel", poller = @Poller(fixedDelay = "100"))
public S3InboundFileSynchronizingMessageSource s3InboundFileSynchronizingMessageSource() {
S3InboundFileSynchronizingMessageSource messageSource =
new S3InboundFileSynchronizingMessageSource(s3InboundFileSynchronizer());
messageSource.setAutoCreateLocalDirectory(true);
messageSource.setLocalDirectory(LOCAL_FOLDER);
messageSource.setLocalFilter(new AcceptOnceFileListFilter<File>());
return messageSource;
}