Java DSL for Spring Integration 1.1 GA is Available

Engineering | Artem Bilan | September 22, 2015 | ...

Dear Spring Community!

On behalf of Spring Integration team I'm pleased to announce that the 1.1 GA of Spring Integration Java DSL is now available from the Release Repository and Maven Central:

For Gradle use this dependency:

'org.springframework.integration:spring-integration-java-dsl:1.1.0.RELEASE'

For Maven this:

<dependency>
     <groupId>org.springframework.integration</groupId>
     <artifactId>spring-integration-java-dsl</artifactId>
     <version>1.1.0.RELEASE</version>
</dependency>

First of all a big thanks to everyone who visited my talk at the SpringOne 2GX 2015 last week. An additional thanks for all the feedback we have received.

Thanks to that we were able to add some minor fixes between GA and previous Milestone.

And as I promised on my talk we added the DSL definition for simple adapters from the Spring Integration Core module.

Let me demonstrate it here one more time and explain on what the solution is based to share some hooks for future contributors:

@Bean
public IntegrationFlow feedFlow() {
return IntegrationFlows
              .from(s -> s.feed(this.feedUrl, "feedTest")
                                    .feedFetcher(new FileUrlFeedFetcher())
                                    .metadataStore(metadataStore()),
                             e -> e.poller(p -> p.fixedDelay(100)))
              .channel(c -> c.queue("entries"))
              .get();
}
  • It is an IntegrationFlow definition which starts from the inbound-channel-adapter for the FeedEntryMessageSource.
  • The first Lambda for the .from() method is a MessageSources factory which just delegates to the target Namespace Factory:
public FeedEntryMessageSourceSpec feed(URL feedUrl, String metadataKey) {
	return Feed.inboundAdapter(feedUrl, metadataKey);
}

It exists for convenience - to get a gain from IDE auto-completion feature.

  • In this case we delegate to the org.springframework.integration.dsl.feed.Feed Namespace Factory with very short source code:
public abstract class Feed {

	public static FeedEntryMessageSourceSpec inboundAdapter(URL feedUrl, 
                                      String metadataKey) {
		return new FeedEntryMessageSourceSpec(feedUrl, metadataKey);
	}

}
  • The FeedEntryMessageSourceSpec is an implementation of the MessageSourceSpec to have a Builder pattern implementation around FeedEntryMessageSource.

All other components in the Spring Integration Java DSL are built the same way and I hope it looks simple enough to get more and more contribution from the community to address your specific adapters support in the Framework.

Please, stay tuned as we are going to go ahead with the Spring Framework 5 foundation and more organic integration with Java 8.

Project Page | JIRA | Issues | [Contributions] (https://github.com/spring-projects/spring-integration/blob/master/CONTRIBUTING.md) | StackOverflow (spring-integration tag)

Get the Spring newsletter

Thank you for your interest. Someone will get back to you shortly.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring Runtime offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all