how?
we can use a Control Bus
in this situation, the solution can be to setup a separate process that monitors or listens for the batch start event. when a 'positive' event is received, a message is then sent to the Spring Integration Control Bus to 'start'/'stop' certain components. in the example included below, the business case is as follows;
1. poll a directory for files every x interval
2. poll a database for a result every y interval
3. if the database poll comes back positive, stop the directory/file polling
4. if the database poll comes back negative, resume the directory/file polling
here's the Spring Integrations for the file process
file monitor
monitor the batch process
datasource config (for testing purposes)
task executor configs
hopefully this will help with the problem of dynamically monitoring
No comments:
Post a Comment