I am trying to find the configuration for allowing spring-integration-aws to create the remote folder structure locally so it is able to sync.
Example: Given a very long s3 bucket address:
test.s3.bucket/folder1/floder2/folder3/etc/etc/etc/etc
Currently get the error message:
Caused by: java.io.FileNotFoundException: test.s3.bucket/folder1/floder2/folder3/etc/etc/etc/etc/DD2419D7-104E-46FC-A513-9E587E58A949.ZIP.a.writing (No such file or directory)
It looks like it is being caused by not having the full folder structure locally,is it possible to set the S3InboundFileSynchronizingMessageSource
to create this?
Current config:
public S3InboundFileSynchronizingMessageSource s3InboundFileSynchronizingMessageSource() {
S3InboundFileSynchronizingMessageSource messageSource =
new S3InboundFileSynchronizingMessageSource(file);
messageSource.setAutoCreateLocalDirectory(true);
messageSource.setLocalDirectory(new File("onComputer"));
messageSource.setLocalFilter(new AcceptOnceFileListFilter<>());
return messageSource;
When asking questions like this, you need to show more of your configuration, including the synchronizer as well as a full stack trace for the exception.
However, no, there is currently not a mechanism to rebuild the remote file tree - it's a simple flat file-only synchronization between the remote directory leaf node and the localDirectory
.
When autoCreateLocalDirectory
is true, it's done once, during initialization.