News and Events

Spring Integration 5.0 Milestone 2 Available

On behalf of the Spring Integration team I’d like to announce the Second Milestone of Spring Integration 5.0, which is available in the Milestone Repository.

Some highlights of this release since the previous Milestone.

Of course, first of all, big thanks to you, the community, for your contributions!

MongoDb Improvements

  • MongoDbOutboundGateway - for performing queries or any arbitrary operation on the collection

  • An initial Java DSL support for MongoDB components

  • The MongoDb component now can use API in their expressions

public IntegrationFlow mongoDbGatewayFlow() {
    return f -> f
                            .collectionNameFunction(m ->

@MessagingGateway and Java DSL

The Java DSL IntegrationFlow can now start from the interface marked with @MessagingGateway, and all the method calls on the target proxy bean will perform sending Message to the downstream IntegrationFlow. This lets you omit @IntegrationComponentScan and extra channels configuration. For example a simple gateway for Control Bus component:

public interface ControlBusGateway {

    void send(String command);

public IntegrationFlow controlBusFlow() {
    return IntegrationFlows.from(ControlBusGateway.class)

Reactive Streams Support

And of course some news from the Reactive Streams subject.

The MessageChannelReactiveUtils can be used to adapt any MessageChannel to the org.reactivestreams.Publisher. This can be useful when you would like to "flux" an upstream data via integration loosely coupled manner from one side and reactive back pressure from another:

private PollableChannel queueChannel;
                   .subscribe(v -> done.countDown());

This technique is used now in the existing IntegrationFlowDefinition.toReactivePublisher():

public Publisher<Message<Integer>> pollableReactiveFlow() {
    return IntegrationFlows
             .split(s -> s.delimiters(","))
             .<String, Integer>transform(Integer::parseInt)
private Publisher<Message<Integer>> pollablePublisher;

The ReactiveChannel now has ability to subscribe to upstream Publisher alongside with the regular (but back pressure) send(Message<?>) implementation. This allowed us to introduce a feature like start an IntegrationFlow from the Publisher:

Flux<Message<?>> messageFlux = Flux.just("1,2,3,4")
        .map(v -> v.split(","))

QueueChannel resultChannel = new QueueChannel();

IntegrationFlow integrationFlow =
                .<Integer, Integer>transform(p -> p * 2)


Such wise and placing ReactiveChannel in between endpoints (MessageChannels.reactive()), we can reach the best of both integration and reactive worlds!

See What’s New for more information.

We are going to provide more features and improvement in the next Milestones, so, stay tuned and don’t hesitate to come back to us for any feedback!

comments powered by Disqus