-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Spring Integration 5.1 to 5.2 Migration Guide
- Deprecated ChannelInterceptorAware
- JDBC Outbound Gateway maxRows
- DSL
puplishSubscribeChannel
Behavior Change
The ChannelInterceptorAware
has been deprecated in favor of org.springframework.messaging.support.InterceptableChannel
with exact functionality.
A protected AbstractMessageChannel.getInterceptors()
method to obtain an internal AbstractMessageChannel.ChannelInterceptorList
has been renamed to the getIChannelInterceptorList()
since it clashes with the InterceptableChannel.getInterceptors()
and they have a different return types.
The VetoCapableInterceptor.shouldIntercept()
signature has been changed to accept an InterceptableChannel
already.
If the maxRows
for the JdbcOutboundGateway
is > 1
, the query result is returned as a List
even if it contains only one item.
Previously such a behavior was like return only that single item independently of the maxRows
configuration.
Such a logic may break some functionality, when we always expect the list of results.
Given the following IntegrationFlow
:
return f -> f
.publishSubscribeChannel(c -> c
.subscribe(sf -> sf.handle(...)
.subscribe(sf -> sf.handle(...)
.subscribe(sf -> sf.handle(...))
...
If this flow is defined in a static @Bean
definition, the subscribers are invoked in the natural (first to last) order.
However, with previous releases, if the flow is registered dynamically with the IntegrationFlowContext
, the subscribers were invoked last to first.
Starting with the 5.2 release, the subscribers are invoked in the natural (first to last) order, regardless of static Vs. dynamic registration.