This chapter provides an overview of the new features and improvements that have been introduced with Spring Integration 5.0. If you are interested in more details, please see the Issue Tracker tickets that were resolved as part of the 5.0 development process.
MongoDbOutboundGateway allows you to make queries to the database on demand by sending a message to its request channel.
See Section 22.6, “MongoDB Outbound Gateway” for more information.
Spring Integration is now fully based on Spring Framework
5.0 and Project Reactor
Previous Project Reactor versions are no longer supported.
@Poller annotation now has the
errorChannel attribute for easier configuration of the underlying
See Section F.6, “Annotation Support” for more information.
All the request-reply endpoints (based on
AbstractReplyProducingMessageHandler) can now start transaction and, therefore, make the whole downstream flow transactional.
See Section 8.9.6, “Transaction Support” for more information.
Previously, Spring Integration JMS XML configuration used a default bean name
connectionFactory for the JMS Connection Factory, allowing the property to be omitted from component definitions.
It has now been renamed to
jmsConnectionFactory, which is the bean name used by Spring Boot to auto-configure the JMS Connection Factory bean.
If your application is relying on the previous behavior, rename your
connectionFactory bean to
jmsConnectionFactory, or specifically configure your components to use your bean using its current name.
The gateway now correctly sets the
errorChannel header when the gateway method has a
void return type and an error channel is provided.
Previously, the header was not populated.
This had the effect that synchronous downstream flows (running on the calling thread) would send the exception to the configured channel but an exception on an async downstream flow would be sent to the default
See Section 8.4.8, “Error Handling” for more information.
Some inconsistencies with rendering IMAP mail content have been resolved. See the note in the Mail-Receiving Channel Adapter Section for more information.
Instead of the
com.rometools.fetcher.FeedFetcher, which is deprecated in ROME, a new
Resource property has been introduced to the
See Chapter 13, Feed Adapter for more information.
FileHeaders.RELATIVE_PATH Message header has been introduced to represent relative path in the
See Section 14.2, “Reading Files” for more information.
The tail adapter now supports
idleEventInterval to emit events when there is no data in the file during that period.
See Section 14.2.6, “'Tail’ing Files” for more information.
The inbound channel adapters now have a property
max-fetch-size which is used to limit the number of files fetched during a poll when there are no files currently in the local directory.
The regex and pattern filters can now be configured to always pass directories. This can be useful when using recursion in the outbound gateways. See Section 15.7, “FTP Outbound Gateway” and Section 27.10, “SFTP Outbound Gateway” for more information.
Since version 4.3.2 a new
spring.integration.readOnly.headers global property has been added to customize the list of headers which should not be copied to a newly created
Message by the
See Section F.5, “Global Properties” for more information.
There is a new option on the
CharacterStreamReadingMessageSource to allow it to be used to "pipe" stdin and publish an application event when the pipe is closed.
See Section 29.2, “Reading from streams” for more information.
BarrierMessageHandler now supports a discard channel to which late-arriving trigger messages are sent.
See Section 6.8, “Thread Barrier” for more information.
The AMQP outbound endpoints now support setting a delay expression for when using the RabbitMQ Delayed Message Exchange plugin. See Section 11.10, “Delayed Message Exchange” for more information.
The inbound endpoints now support the Spring AMQP
See Section 11.2, “Inbound Channel Adapter” for more information.
DefaultHttpHeaderMapper.userDefinedHeaderPrefix property is now an empty string by default instead of
See Section 17.7, “HTTP Header Mappings” for more information.
Aggregators now use a
SimpleSequenceSizeReleaseStrategy by default, which is more efficient, especially with large groups.
Empty groups are now scheduled for removal after
See Section 6.4, “Aggregator” for more information.
Inbound messages are now mapped with headers
RECEIVED_RETAINED to avoid inadvertent propagation to outbound messages when an application is relaying messages.
The outbound channel adapter now supports expressions for the topic, qos and retained properties; the defaults remain the same.
See Chapter 23, MQTT Support for more information.
The STOMP module has been changed to use
ReactorNettyTcpStompClient, based on the Project Reactor
Reactor2TcpStompSessionManager has been renamed to the
ReactorNettyTcpStompSessionManager according to the
See Chapter 28, STOMP Support for more information.