Add enrich() and channel names option

This commit is contained in:
Artem Bilan
2014-03-05 20:36:51 +02:00
parent 83fb344bd3
commit feb610d92b
9 changed files with 375 additions and 44 deletions

View File

@@ -26,15 +26,12 @@ Spring Integration message flows from Spring `@Configuration` classes.
@Bean
public IntegrationFlow myFlow() {
PollerMetadata pollerMetadata = new PollerMetadata();
pollerMetadata.setTrigger(new PeriodicTrigger(100));
return IntegrationFlows.from(this.integerMessageSource())
.poll(this.inputChannel(), pollerMetadata)
.transform((Integer p) -> p * 2)
return IntegrationFlows.from(this.integerMessageSource(), c -> c.poller(Pollers.fixedRate(100)))
.channel(this.inputChannel())
.filter((Integer p) -> p > 0)
.transform(Object::toString)
.channel(new QueueChannel())
.build();
.channel(MessageChannels.queue())
.get();
}
}
````