I have two services doing similar operations as listed below
Service A
Service A uses @InboundChannelAdapter and does following task
- polls files every 1 minute from remote directory into local directory
- deletes files from remote directory
- process files from local directory
- delete file from local directory
Service B
In Service B we are achieving similar but by using OutBoundGateway.
- Using a external http call to invoke file downloading and processing process every 1 minute
- downloading the files from remote directory using OutBoundGateway sftpchannel1
- process the files from local download directory
- delete files from remote directory using OutBoundGateway sftpchannel2
- delete files from local directory
My current concern is if we keep number of polls and file load same for both service A and B, then which service manages the ftpSession better.