Skip to content

Spring Integration 5.2 to 5.3 Migration Guide

Artem Bilan edited this page Jan 7, 2021 · 4 revisions

Table of Contents

Deprecation Removals

Most of deprecations from previous versions have been removed. It is strongly recommended to move to the replacing API. See JavaDocs for the deprecated API to determine what it is replaced in favor of.

MongoDb Driver 4.0

The spring-integration-mongodb provides now Reactive Streams channel adapter implementations based on the mongodb-driver-reactivestreams. For better end-user experience both sync and reactive drivers are optional dependencies in the spring-integration-mongodb. So, now you have to specify driver explicitly in your project:

implementation "org.springframework.integration:spring-integration-mongodb"
implementation "org.mongodb:mongodb-driver-reactivestreams"
// implementation "org.mongodb:mongodb-driver-sync"

FileSplitter JSON

The FileSplitter doesn't require a JSON processor (e.g. Jackson) presence in the classpath any more. It uses now a SimpleJsonSerializer for its FileMarker serialization when a markersJson is configured.

MqttMessageConverter toMessageBuilder

To allow a further message modification and keep "no extra messages" optimization in the MqttPahoMessageDrivenChannelAdapter, a new MqttMessageConverter.toMessageBuilder() API was introduced. It is recommended to implement this method instead of toMessage(String topic, MqttMessage mqttMessage) in the custom MqttMessageConverter and just delegate to the toMessageBuilder() from the toMessage() (if there is an other reason for this MqttMessageConverter outside of the MqttPahoMessageDrivenChannelAdapter):

Message<?> toMessage(String topic, MqttMessage mqttMessage) {
    return toMessageBuilder(topic, mqttMessage).build();
}