public static PollerSpec fixedDelay(long period) { return fixedDelay(period, null); }
public PollerSpec fixedDelay(long period, TimeUnit timeUnit) { return Pollers.fixedDelay(period, timeUnit); }
public PollerSpec fixedDelay(long period) { return Pollers.fixedDelay(period); }
public static PollerSpec fixedDelay(long period, TimeUnit timeUnit) { return fixedDelay(period, timeUnit, 0); }
public PollerSpec fixedDelay(long period, long initialDelay) { return Pollers.fixedDelay(period, initialDelay); }
public PollerSpec fixedDelay(long period, TimeUnit timeUnit, long initialDelay) { return Pollers.fixedDelay(period, timeUnit, initialDelay); }
public static PollerSpec fixedDelay(Duration period) { return fixedDelay(period.toMillis()); }
public static PollerSpec fixedDelay(Duration period, Duration initialDelay) { return fixedDelay(period.toMillis(), initialDelay.toMillis()); }
@Bean(name = PollerMetadata.DEFAULT_POLLER) public PollerSpec defaultPoller() { return Pollers.fixedDelay(10); }
@Bean public IntegrationFlow messageSourceChannelFlow() { return IntegrationFlows.from(interceptedSource(), e -> e.poller(Pollers.fixedDelay(100)).autoStartup(false)) .handle(p -> { this.fromInterceptedSource = p.getPayload(); this.latch.countDown(); }) .get(); }
@Bean public IntegrationFlow flow() { return IntegrationFlows.from(Amqp.inboundPolledAdapter(connectionFactory(), DSL_QUEUE), e -> e.poller(Pollers.fixedDelay(100)).autoStartup(false)) .handle(p -> { this.fromDsl = p.getPayload(); this.latch.countDown(); }) .get(); }
@Bean public IntegrationFlow supplierFlow2() { return IntegrationFlows.from(() -> "foo", c -> c.poller(Pollers.fixedDelay(100).maxMessagesPerPoll(1))) .<String, String>transform(String::toUpperCase) .channel("suppliedChannel2") .get(); }
public PollerSpec fixedDelay(long period) { return Pollers.fixedDelay(period); }
public PollerSpec fixedDelay(long period, long initialDelay) { return Pollers.fixedDelay(period, initialDelay); }
@Bean public IntegrationFlow dedicatedPollingThreadFlow() { return IntegrationFlows.from(MessageChannels.queue("dedicatedQueueChannel")) .bridge(e -> e .poller(Pollers.fixedDelay(0).receiveTimeout(-1)) .taskScheduler(dedicatedTaskScheduler())) .channel("dedicatedResults") .get(); }
@Override @Bean public IntegrationFlow flow() { return IntegrationFlows.from(Ftp.inboundAdapter(sf()) .filter(new FtpPersistentAcceptOnceFileListFilter(new SimpleMetadataStore(), "rotate")) .localDirectory(new File(tmpDir, "variable")) .localFilenameExpression("#remoteDirectory + T(java.io.File).separator + #root") .remoteDirectory("."), e -> e.poller(Pollers.fixedDelay(1).advice(advice()))) .channel(MessageChannels.queue("files")) .get(); }
@Override @Bean public IntegrationFlow flow() { return IntegrationFlows.from(Ftp.inboundStreamingAdapter(new FtpRemoteFileTemplate(sf())) .filter(new FtpPersistentAcceptOnceFileListFilter(new SimpleMetadataStore(), "rotate")) .remoteDirectory("."), e -> e.poller(Pollers.fixedDelay(1).advice(advice()))) .channel(MessageChannels.queue("files")) .get(); }
@Bean public IntegrationFlow fileReadingFlow() { return IntegrationFlows .from(Files.inboundAdapter(tmpDir.getRoot()) .patternFilter("*.sitest") .useWatchService(true) .watchEvents(FileReadingMessageSource.WatchEventType.CREATE, FileReadingMessageSource.WatchEventType.MODIFY), e -> e.poller(Pollers.fixedDelay(100) .errorChannel("filePollingErrorChannel"))) .filter(File.class, p -> !p.getName().startsWith("a"), e -> e.throwExceptionOnRejection(true)) .transform(Files.toStringTransformer()) .aggregate(a -> a.correlationExpression("1") .releaseStrategy(g -> g.size() == 25)) .channel(MessageChannels.queue("fileReadingResultChannel")) .get(); }
@Bean public IntegrationFlow flow() { return IntegrationFlows.from(Ftp.inboundAdapter(sf()) .filter(new FtpPersistentAcceptOnceFileListFilter(new SimpleMetadataStore(), "rotate")) .localDirectory(localDir()) .remoteDirectory("."), e -> e.poller(Pollers.fixedDelay(1).advice(advice()))) .channel(MessageChannels.queue("files")) .get(); }
@Bean public IntegrationFlow sourceFlow() { return IntegrationFlows .from(Kafka.inboundChannelAdapter(consumerFactory(), TEST_TOPIC3), e -> e.poller(Pollers.fixedDelay(100))) .handle(p -> { this.fromSource = p.getPayload(); this.sourceFlowLatch.countDown(); }) .get(); }