Annavi
Annavi

Reputation: 151

Ftp Polling as service in Spring Integeration

In my application.I need to poll files from FTP Server.But the current load will be very less say per day we will get 2-3 files.so i don't want my service to run always and uses the resources.

Is there any in build or with little customization can i start/stop my FTP polling on demand. Basically i want this FTP polling as service in UNIX. so that when required stop/start.

Am using Spring Integration's int-ftp:inbound-channel-adapter

Upvotes: 0

Views: 95

Answers (1)

Artem Bilan
Artem Bilan

Reputation: 121292

Not sure if it is an issue to keep Object in the Java Heap and don't affect GC...

If you have such a low polling interval you can use cron option on the <poller> to run the polling task once-twice a day.

From other side you can, of course, start/stop any Spring Integration Endpoint using its id and Lifecycle start/stop management operations.

In addition you can expose your endpoint to the JMX and start/stop them from there, or just rely on the Control Bus in your app to do the same.

Upvotes: 1

Related Questions