BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Spring Cloud Stream 2.0 Released with Focus on Performance, Flexibility and Consistency

Spring Cloud Stream 2.0 Released with Focus on Performance, Flexibility and Consistency

This item in japanese

Bookmarks

Pivotal has announced the General Availability release of the Spring Cloud Stream 2.0 framework for building highly scalable event-driven microservices-based applications. This release includes a complete revamp of content-type negotiation functionality (allowing user-defined message converters), a reduced footprint, the option for polling consumers, micrometer metrics support, enhanced Apache Kafka Streams support, and more.

Spring Cloud Stream is a framework for building "highly scalable event-driven microservices connected with shared messaging systems", and provides a number of abstractions and primitives that simplify the writing of message-driven applications within the Spring Ecosystem. A Spring Cloud Stream application consists of a "middleware-neutral core", and the application communicates with the outside world through input and output channels injected into it by the framework. Channels are connected to external brokers through middleware-specific "Binder implementations", of which RabbitMQ and Apache Kafka are currently supported.

The core building blocks of Spring Cloud Stream are:

  • Destination Binders -- components responsible for providing integration with the external messaging systems.
  • Destination Bindings -- the bridge between the external messaging systems and application provided "producers" and "consumers" of messages (created by the Destination Binders).
  • Message -- the canonical data structure used by producers and consumers to communicate with Destination Binders and other applications via external messaging systems.

 

Spring Cloud Stream 2.0
Spring Cloud Stream 2.0 architecture and message flow processing (Image courtesy of the Spring Blog)

 

Spring Cloud Stream 2.0 includes a complete revamp of content-type negotiation functionality for the channel-based binders to address performance, flexibility, and consistency. A recently published blog provides a high-level overview, and more information can be found in the Content Type Negotiation section of the reference guide. This work also enables the new User-defined Message Converters, although it is worth mentioning that Spring Cloud Stream also provides support for Avro-based converters, which also provide a clear path for schema evolution.

Other notable new features and enhancements include:

  • Polling Consumers -- this release introduces polled consumers, which lets the application control message processing rates.
  • Micrometer Support -- the metrics support has been switched to use the newly released Micrometer.
  • New Actuator Binding Controls -- new actuator binding controls allow both the visualisation and control of the Bindings lifecycle.
  • Actuator and Web Are Now Optional -- to "simplify the footprint and to provide greater flexibility" with regard to the choice of web frameworks (imperative versus the new webflux approach), both Spring Boot Actuator and Web are optional dependencies and the framework does not include them by default.
  • Enhanced support for Apache Kafka Streams -- this release includes enhanced interoperability between Kafka Streams and Kafka channel-based bindings, multiple Kafka Streams types (such as KStream and KTable) as bindable components, and interactive-query support.

Additional information on the GA release of Spring Cloud Stream 2.0 can be found in the Spring Engineering blog post "Announcing General Availability of Spring Cloud Stream - Elmhurst.RELEASE (2.0.0.RELEASE)", the Spring Cloud Stream GitHub repository, and the "quick start" guide.

Rate this Article

Adoption
Style

BT