tasks with each service?
Nope, unique executor for each service
@Bean(name = "test1ThreadPoolTaskExecutor") @Qualifier("test1Thread") public Executor test1AsyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(1); executor.setMaxPoolSize(1); executor.setThreadNamePrefix("Test1-"); executor.initialize(); return executor; } Well this uses the same singleton Executor, the randomness is just that the Queue of Executor is filled at random times.
Обсуждают сегодня