-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Spring Integration 5.0 to 5.1 Migration Guide
- Class and Package Tangles
- IntegrationFlowContext
- Dispatcher Exceptions
- Integration Evaluation Context Bean
- Gemfire Module
- AMQP contentType Header Mapping
- Aggregator Changes
- @Publisher annotation processing
- Streaming Remote File Source Comparators
- GenericHandler and MessageHeaders
- Twitter Support
- move
StaticMessageHeaderAccessorto rootintegrationpackage - move acknowledgment related classes to a new
ackspackage - move
MMIHtohandler.support, alongside argument resolvers, alsoHandlerMethodArgumentResolversHolder - move
ErrorMessagePublishertocore - move
PatternMatchUtilstosupport.utils - move
MessageSourceManagementtosupport.management - remove direct reference to
MicrometerMetricsCapterfromIntegrationManagementSupport - add new class
MetricsCaptorLoader - move
OperationsCallbackto inner interface inRemoteFileOperations - move
HttpContextUtilstoconfig - move
IntegrationManagementConfigurerfrommanagementtoconfig - make
grapha top-level package - move classes from
config.dslpackage todslone - rename core
eventpackage toevents
The IntegrationFlowContext is now an interface and IntegrationFlowRegistration is an inner interface of the IntegrationFlowContext.
Exceptions caught and re-thrown by AbstractDispatcher are now more consistent:
- A
MessagingExceptionof any kind, with afailedMessageproperty, is re-thrown unchanged - All other exceptions are wrapped in a
MessageDeliveryExceptionwith thefailedMessageproperty set
Previously:
- A
MessagingExceptionof any kind, with afailedMessageproperty, was re-thrown unchanged - A
MessagingException, with nofailedMessageproperty, was wrapped in aMessagingExceptionwith thefailedMessageproperty set - Other
RuntimeExceptions were re-thrown unchanged - Checked exceptions were wrapped in a
MessageDeliveryExceptionwith thefailedMessageproperty set
An integrationSimpleEvaluationContext bean for the SimpleEvaluationContext is now registered along with the integrationEvaluationContext bean for the StandardEvaluationContext. Therefore an injection for the EvaluationContext should be reconsidered for the appropriate bean to use.
Right now this module is based on the Open Source Spring Data for Apache Geode project as transitive dependency.
To switch to the commercial Pivotal GemFire based Spring Data for Pivotal GemFire, exclude spring-data-geode from dependencies and add spring-data-gemfire:
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-gemfire</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-geode</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-gemfire</artifactId>
</dependency>The contentType header is no longer incorrectly mapped as an entry in the MessageProperties.headers map; it is only mapped to the MessageProperties.contentType property (which is represented as content_type in RabbitMQ).
Previously the header was mapped in both places.
Now a negative groupTimeout results in the immediate group expiration functionality without any scheduling.
Only the null result of the groupTimeout calculation is treated as like "do nothing" for the current message to process.
Now an AbstractCorrelatingMessageHandler performs a MessageBuilder.popSequenceDetails() message headers modification for the proper splitter-aggregator scenario with several nested levels.
This functionality can be controlled by a new popSequence boolean property, so the MessageBuilder.popSequenceDetails() can be disabled in some scenarios when correlation details have not been populated by the standard splitter, for example.
Also an AbstractAggregatingMessageGroupProcessor returns now an AbstractIntegrationMessageBuilder instead of the whole Message for optimization.
Now to enable a @Publisher annotation AOP proxying, the @EnablePublisher must be declared on some @Configuration class.
The work which is done by the PublisherAnnotationBeanPostProcessor to scan classes for the @Publisher annotation is too heavy, so the Framework doesn't register it by default any more.
With the XML configuration, for the same purpose, the <int:enable-publisher> sub-element must be declared on the <int:annotation-config>.
Comparators used to sort remote file lists for streaming inbound channel adapters are now applied to the raw object representing the remote file, rather than an AbstractFileInfo object.
e.g. for FTP, use Comparator<FTPFile> and for SFTP, use Comparator<LsEntry>.
The GenericHandler.handle() now expects a MessageHeaders type for the second argument instead of plain Map<String, Object>.
This is to provide a better end-user experience, especially for type-safe header retrieval.
Existing lambdas in the Java DSL's .handle() are fully compatible, but need recompilation for the new GenericHandler byte code.
Only direct GenericHandler interface implementations have to be changed accordingly for the new API.
Since Spring Social project is heading to its End of Life, we have moved spring-integration-twitter module to separate project under Spring Integration Extensions umbrella and now it is available as a separate artifact org.springframework.integration:spring-integration-social-twitter:1.0.0.RELEASE.