ConfigurableApplicationContext ac = new ClassPathXmlApplicationContext("META-INF/spring/integration/sequentialFileProcessing-config.xml");
PollableChannel filesOutChannel = ac.getBean("filesOutChannel", PollableChannel.class);
for (int i = 0; i < fileCount; i++) {
logger.info("Finished processing " + filesOutChannel.receive(10000).getPayload());
}
ac.stop();
}
@Test
public void testConcurrentFileProcessing() throws Exception {
logger.info("\n\n#### Starting Concurrent processing test #### ");
logger.info("Populating directory with files");