1

We have job which polls for file and db every M-F between 1PM-5PM using cron expression. During this time if file arrives it downloads the file and invoke a job. This is working fine and we have used spring integration and batch.

Now we need some customization where we have multiple job where job1 one should poll like above once file is processed successfully, it should stop polling.

Second requirement is, in case if file does not come during polling period we want to send some notification to ops team so that they can take some actions.

user509755
  • 2,941
  • 10
  • 48
  • 82

1 Answers1

1

Would that help ? Exit Spring Integration when no more messages

You would be able to implement custom behavior in that advice, based on polling result and the time of the day.

Garry is also mentionning that conditional pollers are coming in next versions :

http://docs.spring.io/spring-integration/docs/4.2.0.BUILD-SNAPSHOT/reference/html/messaging-channels-section.html#conditional-pollers

Community
  • 1
  • 1
Vincent F
  • 6,523
  • 7
  • 37
  • 79
  • Also see [this answer](http://stackoverflow.com/questions/25229145/stopping-a-file-inbound-channel-adapter-after-one-one-file-is-read/25231018#25231018) for your first case; a 4.2. conditional poller could be used for the second requirement - fire an event if no polls produced a message in the required time frame. – Gary Russell Jun 27 '15 at 14:18