I have two spring boot applications (1.4.3.RELEASE) that are on the same server. Appendix A is a monolithic application that contains part of the code used to process alerts, and Appendix B is a new dedicated application that processes only alerts. The goal here is to break up a monolithic application in small applications. At the moment, the two codes work together, because I have old systems that are always called application A.
Two applications have a TaskScheduler configured based on ThreadPoolTaskScheduler.
@Configuration
public class TaskSchedulerConfig {
@Bean
public TaskScheduler taskScheduler() {
ThreadPoolTaskScheduler threadPoolTaskScheduler = new ThreadPoolTaskScheduler();
threadPoolTaskScheduler.setWaitForTasksToCompleteOnShutdown(true);
threadPoolTaskScheduler.setPoolSize(100);
return threadPoolTaskScheduler;
}
}
Yesterday I experienced strange behavior:
- Warning detected and sent to new application B → OK
- Appendix B received a warning and started processing it based on taskScheduler -> OK
- B → OK
- A → NOK,
- B → OK
? taskScheduler , . ?
, . . , . .
, . , . , . .
: ? threadPoolTaskScheduler?