We use int-ftp:inbound-channel-adapter with fixed rate poller. For maintenance purpose we want the ability to stop the poller when ever needed(using a url). We use the below adapter configuration.
<int-ftp:inbound-channel-adapter id="inboundAdapter"
channel="inputChannel" session-factory="sessionFactory"
charset="UTF-8" auto-create-local-directory="false"
delete-remote-files="true" filename-regex="^.*\.(txt|in)$"
remote-directory="${remote.directory}" local-directory="${local.directory}">
<poller max-messages-per-poll="-1" fixed-rate="3000" error-channel="errorChannel"/>
</int-ftp:inbound-channel-adapter>
Below is the behavior we need to add to this adapter.
- We want to continue doing the fixed rate polling
- We don't want to keep the files staged in local directory at any moment, local directory is a cloud container location
- When we hit a url, the poller should not honor the fixed rate polling( which means, do not pull files from remote directory to local directory) but any staged files in local directory should be processed completely
- We need another handler to start the poller back with the fixed rate polling
Any suggestions to modify the adapter for achieving this is helpful.