In spring integration, I want to poll files from different source directories (each interface configured have different source directories) which is configured in as sourcePath in yml file (dynamically) like below. N number of interfaces can be added by user.
interfaces:
-
sourceType: NFS
sourcePath: /Interface-1/Inbound/text
target: Interface-1
targetType: S3
targetPath: test-bucket-1
-
sourceType: NFS
sourcePath: /Interface-2/Inbound/text
target: Interface-2
targetType: S3
targetPath: test-bucket-2
Is it possible to poll the files from different source folders using single inbound adapter (using atomic reference) or need more than one inbound adapter?
Currently application polls files from base directory.
<file:inbound-channel-adapter id="filesInboundChannel"
directory="file:${base.path}" auto-startup="false" scanner="scanner" auto-create-directory="true">
<integration:poller id="poller" max-messages-per-poll="${max.messages.per.poll}" fixed-rate="${message.read.frequency}" task-executor="pollingExecutor">
<integration:transactional transaction-manager="transactionManager" />
</integration:poller>
</file:inbound-channel-adapter>
Can someone give an advice on this or is there any other way can also achieve the same goal