Add Stream processing example

This commit is contained in:
Ivan Paolillo
2016-09-01 12:20:44 +02:00
parent d9da586447
commit 54d3d40e72
16 changed files with 347 additions and 347 deletions
@@ -16,14 +16,14 @@ import org.springframework.integration.support.MessageBuilder;
@SpringBootApplication
public class TimeSourceApplication {
@Bean
@InboundChannelAdapter(value = Source.OUTPUT, poller = @Poller(fixedDelay = "10000", maxMessagesPerPoll = "1"))
public MessageSource<Long> timeMessageSource() {
@Bean
@InboundChannelAdapter(value = Source.OUTPUT, poller = @Poller(fixedDelay = "10000", maxMessagesPerPoll = "1"))
public MessageSource<Long> timeMessageSource() {
return () -> MessageBuilder.withPayload(new Date().getTime()).build();
}
return () -> MessageBuilder.withPayload(new Date().getTime()).build();
}
public static void main(String[] args) {
SpringApplication.run(TimeSourceApplication.class, args);
}
public static void main(String[] args) {
SpringApplication.run(TimeSourceApplication.class, args);
}
}