Skip to content

Latest commit

 

History

History
149 lines (92 loc) · 7.04 KB

whats-new.adoc

File metadata and controls

149 lines (92 loc) · 7.04 KB

What’s new in Spring Integration 5.0?

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.

New Components

MongoDB Outbound Gateway

The new MongoDbOutboundGateway allows you to make queries to the database on demand by sending a message to its request channel. See MongoDB Outbound Gateway for more information.

HTTP Async Outbound Gateway and Channel Adapter

The new AsyncHttpRequestExecutingMessageHandler adds support for AsyncRestTemplate for outbound channel adapter and gateway. See [AsyncHttpRequestExecutingMessageHandler] for more information.

General Changes

Spring Integration is now fully based on Spring Framework 5.0 and Project Reactor 3.0. Previous Project Reactor versions are no longer supported.

Core Changes

The @Poller annotation now has the errorChannel attribute for easier configuration of the underlying MessagePublishingErrorHandler. See [annotations] for more information.

All the request-reply endpoints (based on AbstractReplyProducingMessageHandler) can now start transaction and, therefore, make the whole downstream flow transactional. See [tx-handle-message-advice] for more information.

The SmartLifecycleRoleController now provides methods to obtain status of endpoints in roles. See [endpoint-roles] for more information.

JMS Changes

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.

Gateway Changes

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 errorChannel instead. See [gateway-error-handling] for more information.

Mail Changes

Some inconsistencies with rendering IMAP mail content have been resolved. See the note in the Mail-Receiving Channel Adapter Section for more information.

Feed Changes

Instead of the com.rometools.fetcher.FeedFetcher, which is deprecated in ROME, a new Resource property has been introduced to the FeedEntryMessageSource. See [feed] for more information.

File Changes

The new FileHeaders.RELATIVE_PATH Message header has been introduced to represent relative path in the FileReadingMessageSource. See [file-reading] for more information.

The tail adapter now supports idleEventInterval to emit events when there is no data in the file during that period. See [file-tailing] for more information.

The flush predicates for the FileWritingMessageHandler now have an additional parameter. See [file-flushing] for more information.

The file outbound channel adapter (FileWritingMessageHandler) now supports the REPLACE_IF_MODIFIED FileExistsMode.

(S)FTP Changes

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 [ftp-outbound-gateway] and [sftp-outbound-gateway] for more information.

The FTP and SFTP outbound gateways now support the REPLACE_IF_MODIFIED FileExistsMode when fetching remote files. See [ftp-outbound-gateway] and [sftp-outbound-gateway] for more information.

The (S)FTP streaming inbound channel adapters now add a JSON representation of the remote file information in a message header. See [ftp-streaming] and [sftp-streaming] for more information.

Integration Properties

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 MessageBuilder. See [global-properties] for more information.

Stream Changes

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 [stream-reading] for more information.

Barrier Changes

The BarrierMessageHandler now supports a discard channel to which late-arriving trigger messages are sent. See [barrier] for more information.

AMQP Changes

The AMQP outbound endpoints now support setting a delay expression for when using the RabbitMQ Delayed Message Exchange plugin. See [amqp-delay] for more information.

The inbound endpoints now support the Spring AMQP DirectMessageListenerContainer. See [amqp-inbound-channel-adapter] for more information.

Pollable AMQP-backed channels now block the poller thread for the poller’s configured receiveTimeout (default 1 second). See [amqp-channels] for more information.

HTTP Changes

The DefaultHttpHeaderMapper.userDefinedHeaderPrefix property is now an empty string by default instead of X-. See [http-header-mapping] for more information.

Aggregator Performance Changes

Aggregators now use a SimpleSequenceSizeReleaseStrategy by default, which is more efficient, especially with large groups. Empty groups are now scheduled for removal after empty-group-min-timeout. See [aggregator] for more information.

MQTT Changes

Inbound messages are now mapped with headers RECEIVED_TOPIC, RECEIVED_QOS and 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 [mqtt] for more information.

STOMP Changes

The STOMP module has been changed to use ReactorNettyTcpStompClient, based on the Project Reactor 3.0 and reactor-netty extension. The Reactor2TcpStompSessionManager has been renamed to the ReactorNettyTcpStompSessionManager according to the ReactorNettyTcpStompClient foundation.

See [stomp] for more information.

Web Services Changes

  • The WebServiceOutboundGateway s can now be supplied with an externally configured WebServiceTemplate instances.

  • The DefaultSoapHeaderMapper can now map a javax.xml.transform.Source user-defined header to a SOAP header element.

See [ws] for more information.