Add Stream processing example
This commit is contained in:
+8
-8
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user