2. What’s new in Spring Integration 4.3?

This chapter provides an overview of the new features and improvements that have been introduced with Spring Integration 4.3. If you are interested in more details, please see the Issue Tracker tickets that were resolved as part of the 4.3 development process.

2.1 New Components

2.1.1 MessageGroupFactory

The new MessageGroupFactory strategy has been introduced to allow a control over MessageGroup instances in MessageGroupStore logic. The SimpleMessageGroupFactory is provided for the SimpleMessageGroup with the GroupType.HASH_SET as the default factory for the standard MessageGroupStore implementations. See Section 9.4, “Message Store” for more information.

2.2 General Changes

2.2.1 Outbound Gateway within Chain

Previously, it was possible to specify a reply-channel on an outbound gateway within a chain. It was completely ignored; the gateway’s reply goes to the next chain element, or to the chain’s output channel if the gateway is the last element. This condition is now detected and disallowed. If you have such configuration, simply remove the reply-channel.

2.2.2 Mail Changes

The customizable userFlag added in 4.2.2 to provide customization of the flag used to denote that the mail has been seen is now available using the XML namespace. See Section 21.4, “Marking IMAP Messages When \Recent is Not Supported” for more information.

2.2.3 JMS Changes

The DefaultJmsHeaderMapper now maps the standard correlationId header as a message property by invoking its toString() method. See Section 20.6, “Mapping Message Headers to/from JMS Message” for more information.

2.2.4 Aggregator Changes

There is a change in behavior when a POJO aggregator releases a collection of Message<?> objects; this is rare but if your application does that, you will need to make a small change to your POJO. See this Important note for more information.

2.2.5 TCP/UDP Changes

A new TcpConnectionServerListeningEvent is emitted when a server connection factory is started. See Section 31.5, “TCP Connection Events” for more information.

The destination-expression and socket-expression are now available for the <int-ip:udp-outbound-channel-adapter>. See Section 31.2, “UDP Adapters” for more information.

2.2.6 File Changes

Destination Directory Creation

The generated file name for the FileWritingMessageHandler can represent sub-path to save the desired directory structure for file in the target directory. See Section 14.3.1, “Generating File Names” for more information.

Buffer Size

When writing files, you can now specify the buffer size to use.

Appending and Flushing

You can now avoid flushing files when appending and use a number of strategies to flush the data during idle periods. See Section 14.3.4, “Flushing Files When using APPEND_NO_FLUSH” for more information.

2.2.7 AMQP Changes

Content Type Message Converter

The outbound endpoints now support a RabbitTemplate configured with a ContentTypeDelegatingMessageConverter such that the converter can be chosen based on the message content type. See Section 11.7, “Outbound Message Conversion” for more information.

Headers for Delayed Message Handling

Spring AMQP 1.6 adds support for Delayed Message Exchanges. Header mapping now supports the headers (amqp_delay and amqp_receivedDelay) used by this feature.

2.2.8 Redis Changes

List Push/Pop Direction

Previously, the queue channel adapters always used the Redis List in a fixed direction, pushing to the left end and reading from the right end. It is now possible to configure the reading and writing direction using rightPop and leftPush options for the RedisQueueMessageDrivenEndpoint and RedisQueueOutboundChannelAdapter respectively. See Section 24.3.4, “Redis Queue Inbound Channel Adapter” and Section 24.3.5, “Redis Queue Outbound Channel Adapter” for more information.

Queue Inbound Gateway Default Serializer

The default serializer in the inbound gateway has been changed to a JdkSerializationRedisSerializer for compatibility with the outbound gateway. See Section 24.10, “Redis Queue Inbound Gateway” for more information.

2.2.9 HTTP Changes

Previously, with requests that had a body (such as POST) that had no content-type header, the body was ignored. With this release, the content type of such requests is considered to be application/octet-stream as recommended by RFC 2616. See Section 17.2, “Http Inbound Components” for more information.

2.2.10 SFTP Changes

A new factory bean is provided to simplify the configuration of Jsch proxies for SFTP. See Section 27.3, “Proxy Factory Bean” for more information.

2.2.11 FTP Changes

The FtpSession now supports null for the list() and listNames() method, since it is possible by the underlying FTP Client. With that the FtpOutboundGateway can now be configured without remoteDirectory expression. And the <int-ftp:inbound-channel-adapter> can be configured without remote-directory/remote-directory-expression. See Chapter 15, FTP/FTPS Adapters for more information.

2.2.12 Router Changes

The ErrorMessageExceptionTypeRouter supports now the Exception superclass mappings to avoid duplication for the same channel in case of several inheritors. For this purpose the ErrorMessageExceptionTypeRouter loads mapping classes during initialization to fail-fast for a ClassNotFoundException.

See Section 6.1, “Routers” for more information.

2.2.13 Header Mapping

AMQP, WS and XMPP header mappings (e.g. request-header-mapping, reply-header-mapping) now support negated patterns. See Section 11.9, “AMQP Message Headers”, Section 34.5, “WS Message Headers”, and Section 36.6, “XMPP Message Headers” for more information.