Java DSL for Spring Integration 1.2 Release is available

Dear Spring Community,

It’s my pleasure to announce that the Java DSL for Spring Integration 1.2 GA is now available.

The artifact org.springframework.integration:spring-integration-java-dsl:1.2.0.RELEASE is available in the Release repo and Maven Central.

Since the previous Release Candidate 1 we have received some feedback and these additional features have been added:

Thread Barrier support

A new .barrier() and its mirror .trigger() EIP-methods have been added to the IntegrationFlow definition:

private static final String BARRIER = "barrier";

@Bean
public IntegrationFlow barrierFlow() {
    return f -> f
        .barrier(10000, b -> b
                .correlationStrategy(
                         new HeaderAttributeCorrelationStrategy(BARRIER))
                 .outputProcessor(g ->
                         g.getMessages()
                                 .stream()
                                 .skip(1)
                                 .findFirst()
                                 .get()))
         .channel(c -> c.queue("barrierResults"));
}

@Bean
public IntegrationFlow releaseBarrierFlow(
                          MessageTriggerAction barrierTriggerAction) {
    return IntegrationFlows.from((Channels c) -> c.queue("releaseChannel"))
        .trigger(barrierTriggerAction,
            e -> e.poller(p -> p.fixedDelay(100)))
        .get();
}
Read more...