Skip to content

4.0 Migration guide

Soby Chacko edited this page Jun 6, 2023 · 16 revisions

Introduction

This document describes both what's new in Spring Cloud Stream 4.0 as well as provide guidelines about the thing that have changed and may require changes to be made by the user

Java 17/Boot 3/SF 6 baseline

No more Annotations

In version 2.0 we have introduced functional programming style for implementing message handlers. For several versions we have supported both functional and annotation-based model. Since version 4.0 annotation-based programming model is removed. Here is how you should migrate your old StreamListener to. . . . TBD. .

Reactive functions vs. Imperative

Spring Cloud Stream 4.0 provides a dedicated reactive binder for Apache Kafka based on Reactor Kafka. If you have reactive use cases with Apache Kafka, consider migrating to this binder. For other middleware systems, use reactive functions judiciously as the underlying binders may not provide a full end-to-end reactive paradigm.

Binding specific error channel naming scheme

Old scheme created a possibility of naming collision since it was not unique. The <destination>.<group>.errors relies on the fact that destination name is uniques across the application. However that is not the case since it could have the same name across tow different messaging systems. Further more destination naming is not something that is under control of the user, rather messaging system administrator. Point to the doc where functional error handling is explained TBD. . .

Explicit bindings

https://github.com/spring-cloud/spring-cloud-stream/issues/2626

Reactive Kafka Binder

TBD

Schema Registry

TBD

Rabbit Streams

Details

Headers through BiFunction

Details

BinderAwareChannelResolver gone

Details

Native Support

Details

Not end-user specific, but should we call out that we are now a mono-repo for code/maintenance purposes?

Details

Spring Integration Test Binder

Is using the Spring Integration Test Binder new to 4.0?

Kafka Clients Update

Kafka client versions are directly coming from Spring Boot via Spring for Apache Kafka.