Announcing Spring Cloud Stream Horsham.M3 (3.0.0.M3)

Engineering | Oleg Zhurakousky | August 19, 2019 | ...

We are pleased to announce the third Milestone of the Spring Cloud Stream Horsham.M3 (3.0.0.M3).

NOTE: Spring Cloud Stream 3.0.0.M1/M2 was primarily to establish compatibility with Spring Boot 2.2.x. and therefore went unannounced.

Spring Cloud Stream Horsham.M3 (3.0.0.M3) modules are available for use in the Spring Milestone repository.

Quick highlights:

  • Spring Boot 2.2.x
  • Spring Cloud Function 3.0.0.M2

Notable features and enhancements for this milestone:

Emphasis on functional programming model

While we're not (yet) deprecating @StreamListener and/or @EnableBinding, we are moving toward a simpler and more natural auto-configuration driven programming model.

@SpringBootApplication
public class MyApplicationConfiguration {

    @Bean
    public Function<String, String> uppercase() {
        return value -> value.toUpperCase();
    }
}

The above is a completely functioning spring-cloud-stream application. Notice the lack of @StreamListener and @EnableBinding. The fact that it's a Function bootstrapped in the context of spring-cloud-stream (since it's on the classpath) effectively tell us all the information that @StreamListener and @EnableBinding were telling us before (e.g., Function maps to Processor with default destination names as "input" and "output").

NOTE: One of the improvements in spring-cloud-function is that we no longer auto-transform non-reactive functions to reactive functions. This means that your imperative function will be wired as any other Message Handler (e.g., StreamListener) while reactive function will be wired the same way as reactive listeners on spring-cloud-stream-reactive module (more on that in another blog) giving you more flexibility.

In the coming weeks we will be updating Functional Support documentation with more details.

Functional support in Kafka Streams

Kafka Streams binder now supports a first class function based programming model using which you can now write your Kafka Streams applications based on java.util.function support. This further reduces the boilerplate code that the applications need to write and allow the developers to focus on the business logic at hand. For further details, please visit Functional Style section for more details. We are planning to have another dedicated write up going over all the new features.

Other features, enhancements and bug fixes

Next Steps

One big feature we are planning to introduce in the next milestone is support for functions with multiple inputs and outputs for which there will be a separate blog.

As always, we welcome feedback and contributions, so please reach out to us on Stackoverflow or GitHub and or Gitter

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