@Bean public IntegrationFlow supplierFlow2() { return IntegrationFlows.from(() -> "foo", c -> c.poller(Pollers.fixedDelay(100).maxMessagesPerPoll(1))) .<String, String>transform(String::toUpperCase) .channel("suppliedChannel2") .get(); }
.poller(p -> p .fixedDelay(10) .maxMessagesPerPoll(1) .receiveTimeout(10))) .handle(new BeanFactoryHandler(), e -> e.id("anId"));
private void initIntegrationFlow() { this.integrationFlow = IntegrationFlows .from(Files.inboundAdapter(new File(this.jobListenerConfiguration.getSourceFolder())) .filter(this.fileFileListFilter) .scanEachPoll(Boolean.TRUE) .get(), e -> { e.poller(Pollers.fixedRate(this.jobListenerConfiguration.getPollerPeriod()).maxMessagesPerPoll(1000)); e.autoStartup(Boolean.TRUE); }) .transform(this.transformer, e -> e.autoStartup(Boolean.TRUE)) .handle(this.jobLaunchingMessageHandler) .channel(MessageChannels.direct()) .handle(new JobExecutionFinishedMessageHandler()) .get(); }
private void initIntegrationFlow() { this.integrationFlow = IntegrationFlows .from(Files.inboundAdapter(new File(this.jobListenerConfiguration.getSourceFolder())) .filter(this.fileFileListFilter) .scanEachPoll(Boolean.TRUE) .get(), e -> { e.poller(Pollers.fixedRate(this.jobListenerConfiguration.getPollerPeriod()).maxMessagesPerPoll(1000)); e.autoStartup(Boolean.TRUE); }) .transform(this.transformer, e -> e.autoStartup(Boolean.TRUE)) .handle(this.jobLaunchingMessageHandler) .channel(MessageChannels.direct()) .handle(new JobExecutionFinishedMessageHandler()) .get(); }