3. What’s New in 2.1?

Spring Cloud Stream introduces a number of new features, enhancements, and changes in addition to the once already introduced in version 2.0

The following sections outline the most notable ones:

3.1 New Features and Components

  • Spring Cloud Function: One of the core themes of the 2.1.x release is the introduction of programming model based on Spring Cloud Function project. For more details you can jump right into the relevant section. You can also read this blog post for more details.
  • Simplified Test Binder: In addition to an already existing testing support via spring-cloud-stream-test-support, this release also introduces a simpler implementation of a test binder that is more aligned with the current binder API providing for a better integration testing as it is touches on all aspects of binding API. This binder was primarily designed for internal use, but found its usages outside. For more information on how to use it and how it can help you please refer to this section of user guide.

3.2 Notable Enhancements

  • Improved Reactive Support: Given that Project Reactor primitives such as Flux and Mono are at the core of Spring Cloud Function project, you no longer have to use or draw any distinction between reactive and conventional stream handler design, hence you no longer need to explicitly rely on spring-cloud-stream-reactive module, which we’re now considering for deprecation. For more details please refer to Spring Cloud Function section of this user guide.
  • Enhanced properties binding support: This version of Spring Cloud Stream introduces significant enhancements to configuration properties bindings primarily to ensure consistency between the default and binding specific properties. A particular emphasis was given to maintaining the precedence and inheritance aspects where:

    • precedence - binding specific properties always take precedence over the default properties, effectively allowing binding specific properties to override the default ones
    • inheritance - default will propagate to individual binding properties unless explicitly overriden by the binding specific properties
  • Additional Content-Type Negotiation Improvements: One of the core themes for 2.0.x release was an improved content-type negotiation. This release introduces few more significant enhancements to introduce more consistency. One such enhancement is the delegation of type conversion to MessageConverters in all cases, including the ones where the target type of the handler method is not known. To you (the end user) it simply means that starting with this release extending content-type negotiation via @StreamMessageConverter is available for all type conversion cases. NOTE: Keep in mind that most of the content-type work at the moment also preserves compatibility with 1.3.x version of Spring Cloud Stream, thus will be further simplified once 1.3.x line goes EOL.

3.3 Notable Deprecations

As of version 2.1, the following items have been deprecated:

  • Aggregator Builder support is deprecated in favor of application composition via Spring Cloud Function programming model.
  • As mentioned earlier we’re also considering the deprecation of spring-cloud-stream-reactive module in favor of the adequate support already provided by Spring Cloud Function.